IF TEST = 1 { ASSIGN MyDateTime = #"{now}" } //Returns a new date based on the original date plus value IN either OLE //automation format or as a string formatted date. The interpretation of //value is determined by the unit. //Possible choices FOR unit are: year, month, week, day, hour, minute, //and second. //Enclose the unit IN double or single quotes, or pass a variable which //contains the unit name. The unit name is CASE sensitive. //[String expression] Resulting date will be formatted as a standard date/time //string: MM/dd/yyyy h:mm.ss AM/PM. //[Numeric expression] Resulting date will be a floating point value IN OLE //automation format. //These are examples of adding to a datetime variable ASSIGN NewDateYearNumeric = dateadd('year', MyDateTime, 1) //add a single year ASSIGN NewDateYearString = "{NewDateYearNumeric.asdatetime}" ASSIGN NewDateMonthNumeric = dateadd('month', MyDateTime, 1) //add a single month ASSIGN NewDateMonthString = "{NewDateMonthNumeric.asdatetime}" ASSIGN NewDateWeekNumeric = dateadd('week', MyDateTime, 1) //add a single week ASSIGN NewDateWeekString = "{NewDateWeekNumeric.asdatetime}" ASSIGN NewDateDayNumeric = dateadd('day', MyDateTime, 1) //add a single day ASSIGN NewDateDayString = "{NewDateDayNumeric.asdatetime}" ASSIGN NewDateHourNumeric = dateadd('hour', MyDateTime, 1) //add a single hour ASSIGN NewDateHourString = "{NewDateHourNumeric.asdatetime}" ASSIGN NewDateMinuteNumeric = dateadd('minute', MyDateTime, 1) //add a single minute ASSIGN NewDateMinuteString = "{NewDateMinuteNumeric.asdatetime}" ASSIGN NewDateSecondNumeric = dateadd('second', MyDateTime, 1) //add a single second ASSIGN NewDateSecondString = "{NewDateSecondNumeric.asdatetime}" //You can also subtract from the date time variable by putting a minus //sign in front the modifying value. Here is an example ASSIGN OldDateMonthNumeric = dateadd('month', MyDateTime, -2) //remove 2 months ASSIGN OldDateMonthString = "{OldDateMonthNumeric.asdatetime}"