September 9, 2010 at 9:03 am
Hi,
How do I add an integer value (i.e. number of days) to a date value within a Script Task?
I have 2 variables I need to compare:
dteFile (defined as Date). This is derived from part of a xml file (I am looping through a network folder for each file).
dteCurr (defined as Date) which is a variable based on the current date
I need to add a global variable value (i.e. 28 days) to the dteFile and then compare the 2 script task variables.
The format is dd/mm/yyyy
For example
dteFile is #09/03/2010#
and if 28 is added to dtefile
then dteFile should become #06/04/2010#
Note: I need the date format to remain as dd/mm/yyyy
These should be compared and if dtefile < dteCurr then
bolDate (a global variable) needs to be set to true
Any ideas please?
Thanks in advance,
September 9, 2010 at 9:21 am
Have you looked at DateAdd?
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply