AddDate(date, type, value) |
Adds value from the third parameter, which is interpreted according to the second parameter, to the value according to the first parameter.. (Returned value is data type date.)
Parameter type may gain following values:
'day'
'month'
'year'
'second'
'minute'
'hour'
Example:
AddDate(ActualDate(), 'hour', -3) – returns actual time minus 3 hours
|
DateDiff(type, date1, date2) |
Returns the difference in two dates: date1-date2.
When parameter type Days, Hours, Minutes or Seconds is used, it returns a partial difference in date parts according to the input parameter type. (Returned value is data type integer.)
When parameter type TotalDays, TotalHours, TotalMinutes or TotalSeconds is used, it returns the total difference in units of days, hours, minutes or seconds. (Returned value is data type float.)
Returns difference in date parts according to the input parameter type: date1-date2.
(Returned value is data type integer.)
Example:
DateDiff('Minutes',#2012.02.14 14:45:35#,#2012.01.15 14:59:36#) – returns: 45
DateDiff('Seconds',#2012.02.14 14:45:35#,#2012.01.15 14:59:36#) – returns: 59
DateDiff('Days',#2012.01.14 14:45:35#,#2012.01.15 14:59:36#)
– returns: -1
DateDiff('Days',#2012.01.14 14:45:35#,#2012.01.15 14:44:36#)
– returns: 0
DateDiff('TotalSeconds',#2012.01.14 14:45:00#,#2012.01.14 14:46:41#)
– vrátí: 101
DateDiff('TotalMinutess',#2012.01.14 14:45:00#,#2012.01.14 14:46:41#)
– vrátí: 1,68333333 |