Hi Everyone,
Im really having a hard time understanding dates and how to calculate them.
I have a form where there are two dropdowns ...
Dropdown 1 - displays two options - Fixed Date / Fixed Day
Dropdown 2 - dependent on what is selected will display 1-31 if Fixed Date or Mon-Sun if fixed day.
I then have a button to calculate the date which will run a stored procedure, which at the moment looks like this ...
(
@EFOLDERID nvarchar(50), --FolderID to ensure only certain rows are updated
@DATETYPE nvarchar (50), --Either Fixed Date or Fixed Day
@DATEINCREMENT int, --Value to increase the date type by
@DATEFROM datetime --Either the previous milestone added or if Milestone 1 then todays date
)
AS
SET NOCOUNT ON;
if (@DATETYPE = 'Fixed Date')
BEGIN
UPDATE WF_Milestones SET MilestoneDate = DATEADD(DD,@DATEINCREMENT,@DATEFROM) WHERE EFOLDERID = @EFOLDERID
END
I have only started it for the first date type at the moment so I dont bite off more than I can chew, I have read quite a lot about calculating dates but nothing really specific to what I want to achieve. Hopefully you can help, but if anyone has any good resources for creating/calculating dates then I would be very greatful again.
Thanks in advance.