Class Hierarchy
Object > ComponentObject > DateUtilsFunctions
#DateUtils.AddDays(null, *) = null
#DateUtils.AddDays(date, null) = date
#DateUtils.AddDays(2002-03-28T13:45, 2) = 2002-03-30T13:45
#DateUtils.AddDays(2002-03-28T13:45, 14) = 2002-04-11T13:45
#DateUtils.AddDays(2002-03-28T13:45, -2) = 2002-03-26T13:45
#DateUtils.AddDays(2002-03-28T13:45, -29) = 2002-02-27T13:45
datetime FSCEXPEXT@1.1001:AddDays(
datetime dt,
integer amount,
out retval datetime result)
Name |
Description |
dt |
the date
|
amount |
the amount to add, may be negative
|
result |
the new date
|
#DateUtils.AddHours(null, *) = null
#DateUtils.AddHours(date, null) = date
#DateUtils.AddHours(2002-03-28T13:45, 2) = 2002-03-28T15:45
#DateUtils.AddHours(2002-03-28T13:45, 14) = 2002-03-29T03:45
#DateUtils.AddHours(2002-03-28T13:45, -2) = 2002-03-28T11:45
#DateUtils.AddHours(2002-03-28T13:45, -29) = 2002-03-27T08:45
datetime FSCEXPEXT@1.1001:AddHours(
datetime dt,
integer amount,
out retval datetime result)
Name |
Description |
dt |
the date
|
amount |
the amount to add, may be negative
|
result |
the new date
|
#DateUtils.AddMinutes(null, *) = null
#DateUtils.AddMinutes(date, null) = date
#DateUtils.AddMinutes(2002-03-28T13:45, 2) = 2002-03-28T13:47
#DateUtils.AddMinutes(2002-03-28T13:45, 16) = 2002-03-28T14:01
#DateUtils.AddMinutes(2002-03-28T13:45, -2) = 2002-03-28T13:43
#DateUtils.AddMinutes(2002-03-28T13:45, -46) = 2002-03-28T12:59
datetime FSCEXPEXT@1.1001:AddMinutes(
datetime dt,
integer amount,
out retval datetime result)
Name |
Description |
dt |
the date
|
amount |
the amount to add, may be negative
|
result |
the new date
|
#DateUtils.AddMonths(null, *) = null
#DateUtils.AddMonths(date, null) = date
#DateUtils.AddMonths(2002-03-28T13:45, 2) = 2002-05-28T13:45
#DateUtils.AddMonths(2002-03-28T13:45, 14) = 2003-05-28T13:45
#DateUtils.AddMonths(2002-03-28T13:45, -2) = 2002-01-28T13:45
#DateUtils.AddMonths(2002-03-28T13:45, -14) = 2001-01-28T13:45
datetime FSCEXPEXT@1.1001:AddMonths(
datetime dt,
integer amount,
out retval datetime result)
Name |
Description |
dt |
the date
|
amount |
the amount to add, may be negative
|
result |
the new date
|
#DateUtils.AddSeconds(null, *) = null
#DateUtils.AddSeconds(date, null) = date
#DateUtils.AddSeconds(2002-03-28T13:45, 2) = 2002-03-28T13:45:02
#DateUtils.AddSeconds(2002-03-28T13:45, 61) = 2002-03-28T13:46:01
#DateUtils.AddSeconds(2002-03-28T13:45, -2) = 2002-03-28T13:44:58
#DateUtils.AddSeconds(2002-03-28T13:45, -69) = 2002-03-28T13:43:51
datetime FSCEXPEXT@1.1001:AddSeconds(
datetime dt,
integer amount,
out retval datetime result)
Name |
Description |
dt |
the datetime
|
amount |
the amount to add, may be negative
|
result |
the new date
|
#DateUtils.AddWeeks(null, *) = null
#DateUtils.AddWeeks(date, null) = date
#DateUtils.AddWeeks(2002-03-28T13:45, 2) = 2002-04-11T13:45
#DateUtils.AddWeeks(2002-03-28T13:45, -4) = 2002-02-28T13:45
datetime FSCEXPEXT@1.1001:AddWeeks(
datetime dt,
integer amount,
out retval datetime result)
Name |
Description |
dt |
the date
|
amount |
the amount to add, may be negative
|
result |
the new date
|
#DateUtils.AddYears(null, *) = null
#DateUtils.AddYears(date, null) = date
#DateUtils.AddYears(2002-03-28T13:45, 2) = 2004-03-28T13:45
#DateUtils.AddYears(2002-03-28T13:45, -2) = 2000-03-28T13:45
datetime FSCEXPEXT@1.1001:AddYears(
datetime dt,
integer amount,
out retval datetime result)
Name |
Description |
dt |
the date
|
amount |
the amount to add, may be negative
|
result |
the new date
|
#DateUtils.CountDays(null, *) = null
#DateUtils.CountDays(*, null) = null
#DateUtils.CountDays(2002-03-28T13:45, 2002-03-30T13:45) = 2
#DateUtils.CountDays(2002-03-28T13:45, 2002-04-11T13:45) = 14
#DateUtils.CountDays(2002-03-28T13:45, 2002-03-26T13:45) = -2
#DateUtils.CountDays(2002-03-28T13:45, 2002-02-28T13:45) = -28
integer FSCEXPEXT@1.1001:CountDays(
datetime dt1,
datetime dt2,
out retval integer result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
result |
the difference between the two dates.
|
#DateUtils.CountHours(null, *) = null
#DateUtils.CountHours(*, null) = null
#DateUtils.CountHours(2002-03-28T13:45, 2002-03-28T15:45) = 2
#DateUtils.CountHours(2002-03-28T13:45, 2002-03-29T03:45) = 14
#DateUtils.CountHours(2002-03-28T13:45, 2002-03-28T11:45) = -2
#DateUtils.CountHours(2002-03-28T13:45, 2002-03-27T08:45) = -29
integer FSCEXPEXT@1.1001:CountHours(
datetime dt1,
datetime dt2,
out retval integer result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
result |
the difference between the two dates.
|
#DateUtils.CountMinutes(null, *) = null
#DateUtils.CountMinutes(*, null) = null
#DateUtils.CountMinutes(2002-03-28T13:45, 2002-03-28T13:47) = 2
#DateUtils.CountMinutes(2002-03-28T13:45, 2002-03-28T14:01) = 16
#DateUtils.CountMinutes(2002-03-28T13:45, 2002-03-28T13:43) = -2
#DateUtils.CountMinutes(2002-03-28T13:45, 2002-03-28T12:59) = -46
integer FSCEXPEXT@1.1001:CountMinutes(
datetime dt1,
datetime dt2,
out retval integer result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
result |
the difference between the two dates.
|
#DateUtils.CountMonths(null, *) = null
#DateUtils.CountMonths(*, null) = null
#DateUtils.CountMonths(2002-03-28T13:45, 2002-05-28T13:45) = 2
#DateUtils.CountMonths(2002-03-28T13:45, 2003-05-28T13:45) = 14
#DateUtils.CountMonths(2002-03-28T13:45, 2002-01-28T13:45) = -2
#DateUtils.CountMonths(2002-03-28T13:45, 2001-01-28T13:45) = -14
integer FSCEXPEXT@1.1001:CountMonths(
datetime dt1,
datetime dt2,
out retval integer result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
result |
the difference between the two dates.
|
#DateUtils.CountSeconds(null, *) = null
#DateUtils.CountSeconds(*, null) = null
#DateUtils.CountSeconds(2002-03-28T13:45, 2002-03-28T13:45:02) = 2
#DateUtils.CountSeconds(2002-03-28T13:45, 2002-03-28T13:46:01) = 61
#DateUtils.CountSeconds(2002-03-28T13:45, 2002-03-28T13:44:58) = -2
#DateUtils.CountSeconds(2002-03-28T13:45, 2002-03-28T13:44:31) = -29
integer FSCEXPEXT@1.1001:CountSeconds(
datetime dt1,
datetime dt2,
out retval integer result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
result |
the difference between the two dates.
|
#DateUtils.CountWeeks(null, *) = null
#DateUtils.CountWeeks(*, null) = null
#DateUtils.CountWeeks(2002-03-28T13:45, 2002-04-11T13:45) = 2
#DateUtils.CountWeeks(2002-03-28T13:45, 2002-02-28T13:45) = -4
integer FSCEXPEXT@1.1001:CountWeeks(
datetime dt1,
datetime dt2,
out retval integer result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
result |
the difference between the two dates.
|
#DateUtils.CountYears(null, *) = null
#DateUtils.CountYears(*, null) = null
#DateUtils.CountYears(2002-03-28T13:45, 2004-03-28T13:45) = 2
#DateUtils.CountYears(2002-03-28T13:45, 2000-03-28T13:45) = -2
integer FSCEXPEXT@1.1001:CountYears(
datetime dt1,
datetime dt2,
out retval integer result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
result |
the difference between the two dates.
|
#DateUtils.DateCeiling(null, *) = null
#DateUtils.DateCeiling(date, null) = date
#DateUtils.DateCeiling(2002-03-28T13:45:01, DTO_HOUR) = 2002-03-28T14:00:00
#DateUtils.DateCeiling(2002-03-28T13:45:01, DTO_MONTH) = 2002-04-01T00:00:00
datetime FSCEXPEXT@1.1001:DateCeiling(
datetime dt,
ModifyDateTimeOperand operand,
out retval datetime result)
Name |
Description |
dt |
the date
|
operand |
the field specified
|
result |
the result
|
#DateUtils.DateRound(null, *) = null
#DateUtils.DateRound(date, null) = date
#DateUtils.DateRound(2002-03-28T13:45:01, DTO_HOUR) = 2002-03-28T14:00:00
#DateUtils.DateRound(2002-03-28T13:45:01, DTO_MONTH) = 2002-04-01T00:00:00
datetime FSCEXPEXT@1.1001:DateRound(
datetime dt,
ModifyDateTimeOperand operand,
out retval datetime result)
Name |
Description |
dt |
the date
|
operand |
the field specified
|
result |
the result
|
FSCEXPEXT@1.1001:DateTime2LocalTime
datetime london = 2024-06-30T12:00:00;
2024-06-30T11:00:00 == #DateUtils.GetDateTimeInUTC(london, "Europe/London");
Timezones are specified in the Timezones Wiki
datetime FSCEXPEXT@1.1001:DateTime2LocalTime(
datetime date,
string timezone,
out retval datetime dest)
Name |
Description |
date |
source date time to be converted
|
timezone |
timezone identifier from the source date time
|
dest |
the calculated date time
|
#DateUtils.DateTruncate(null, *) = null
#DateUtils.DateTruncate(date, null) = date
#DateUtils.DateTruncate(2002-03-28T13:45:01, DTO_HOUR) = 2002-03-28T13:00:00
#DateUtils.DateTruncate(2002-03-28T13:45:01, DTO_MONTH) = 2002-03-01T00:00:00
datetime FSCEXPEXT@1.1001:DateTruncate(
datetime dt,
ModifyDateTimeOperand operand,
out retval datetime result)
Name |
Description |
dt |
the date
|
operand |
the field specified
|
result |
the result
|
#DateUtils.GetDayInWeek(null) = null
#DateUtils.GetDayInWeek(2002-03-28T13:45) = 4
integer FSCEXPEXT@1.1001:GetDayInWeek(
datetime dt,
out retval integer result)
Name |
Description |
dt |
the date
|
result |
the weekday (0 for sunday, 1 for monday, ... up to 6 for saturday)
|
#DateUtils.GetDayInYear(null) = null
#DateUtils.GetDayInYear(2002-03-28T13:45) = 87
integer FSCEXPEXT@1.1001:GetDayInYear(
datetime dt,
out retval integer result)
Name |
Description |
dt |
the date
|
result |
the day in the year (1 is Jan 1st)
|
#DateUtils.IsSameDay(null, null) = false
#DateUtils.IsSameDay(null, *) = false
#DateUtils.IsSameDay(*, null) = false
#DateUtils.IsSameDay(2002-03-28T13:45, 2002-03-28T06:01) = true
#DateUtils.IsSameDay(2002-03-28T13:45, 2002-03-12T13:45) = false
#DateUtils.IsSameDay(2002-03-28T13:45, 2002-03-12) = false
boolean FSCEXPEXT@1.1001:IsSameDay(
datetime dt1,
datetime dt2,
out retval boolean result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
result |
the boolean result
|
FSCEXPEXT@1.1001:TruncatedCompares
#DateUtils.TruncatedCompares(null, null, *) = null
#DateUtils.TruncatedCompares(null, *, *) = null
#DateUtils.TruncatedCompares(*, null, *) = null
#DateUtils.TruncatedCompares(2002-03-28T13:45, 2002-03-28T06:01, DTO_DAY) = 0
#DateUtils.TruncatedCompares(2002-03-28T13:45, 2002-03-28T06:01, DTO_HOUR) = +1
#DateUtils.TruncatedCompares(2002-03-28T13:45, 2002-03-28T14:01, DTO_HOUR) = -1
integer FSCEXPEXT@1.1001:TruncatedCompares(
datetime dt1,
datetime dt2,
ModifyDateTimeOperand operand,
out retval integer result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
operand |
compare up to the specified field
|
result |
-1 if lower, 0 if equal and +1 if greater.
|
FSCEXPEXT@1.1001:TruncatedEquals
#DateUtils.TruncatedEquals(null, null, *) = false
#DateUtils.TruncatedEquals(null, *, *) = false
#DateUtils.TruncatedEquals(*, null, *) = false
#DateUtils.TruncatedEquals(date1, date2, null) = date1 == date2
#DateUtils.TruncatedEquals(2002-03-28T13:45, 2002-03-28T06:01, DTO_DAY) = true
#DateUtils.TruncatedEquals(2002-03-28T13:45, 2002-03-28T06:01, DTO_HOUR) = false
#DateUtils.TruncatedEquals(2002-03-28T13:45, 2002-03-28T13:01, DTO_HOUR) = true
boolean FSCEXPEXT@1.1001:TruncatedEquals(
datetime dt1,
datetime dt2,
ModifyDateTimeOperand operand,
out retval boolean result)
Name |
Description |
dt1 |
the first date
|
dt2 |
the other date
|
operand |
the field specified
|
result |
the boolean result
|