User-1352156089 posted
Hi All,
I need to populate 2 textboxes with 2 dates in the onload event of my page using ADO.net in code behind.
I translated the following SQL query
declare @Today datetime
declare @LastAvailableDay datetime
set @Today = getdate()
set @LastAvailableDay = dateadd(day,+29, @Today)
SELECT DISTINCT @Today, @LastAvailableDay FROM dbo.DateTable
into the below Stored Procedure:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE getOnloadDates
@Today datetime,
@LastAvailableDay datetime
AS
BEGIN
SET NOCOUNT ON;
SELECT DISTINCT @Today, @LastAvailableDay FROM dbo.DateTable
END
GO
How would you suggest in ADO to specify that @Today should be "getdate()" and @LastAvailableDate should be "dateadd(day,+29, @Today)"?
@Today and @LastAvailableDate should fill the 2 textboxes.
Thank you in advance,
Claudio