DayOfWeek(date) => Returns the name of the day of week that the date falls on
Name
Type
Description
date
Date
The Date to use
Date.DayOfWeek(Date("10/21/2021")); => 'Thursday'
Date.Add()
Add(date, value, part) => Returns the new date after adding to it
Name
Type
Description
date
Date
The Date to use
value
Number
The amount to add to the date
part
Text
The type of amount to add (see table below)
NOTE: These date part strings are only for Date.Add, Date.Part and Date.Diff. If you are using Text or Date to format or create dates, check out the formatting docs.
This function adds (or subtracts if you use a negative number) the number of parts to the date. Specify part using Text as:
Diff(date1, date2, part?) => Returns the difference between date1 and date2 as a number.
Name
Type
Description
date1
Date
The first date
date2
Date
The second date
part?
Text
The type of amount to return (see table below), if not specified it will return days
NOTE: These date part strings are only for Date.Add, Date.Part and Date.Diff. If you are using Text or Date to format or create dates, check out the formatting docs.
This function subtracts date2 from date1 and returns the value in the units specified by part?. If part? is not specified, it will default to returning days.
DatePart(date, part) => Returns the requested part of the date as a number
Name
Type
Description
date
Date
The date
part
Text
The part of the date to extract
NOTE: These date part strings are only for Date.Add, Date.Part and Date.Diff. If you are using Text or Date to format or create dates, check out the formatting docs.
Part
Result
y
Returns Years
year
Returns Years
years
Returns Years
mm
Returns Months
month
Returns Months
months
Returns Months
d
Returns Days
day
Returns Days
days
Returns Days
h
Returns Hours
hour
Returns Hours
hours
Returns Hours
m
Returns Minutes
minute
Returns Minutes
minutes
Returns Minutes
s
Returns Seconds
second
Returns Seconds
seconds
Returns Seconds
ms
Returns Milliseconds
millisecond
Returns Milliseconds
milliseconds
Returns Milliseconds
Date.DatePart(Date("10/21/2021"), 'month'); => 10
Date.Week()
Week(date) => Returns the week number that the date falls on.
Name
Type
Description
date
Date
The date
Date.Week(Date("10/21/2021")); => 42
Date.ToUtc()
ToUtc(date) => Returns the date converted to the UTC timezone.
Note: If the date does not have timezone information, it will be assumed to be in UTC already.