Date & Time Formulas

Formulas

  1. Date

  2. DateTime

  3. Time

CurrentDate

Formula

=currentdate([timezone], [output_format])

Description

Outputs the current date for the timezone and date format given.

Arguments

Argument

Required (Y/N)

Description

timezone

N

Desired timezone of the output

output_format

N

Date format of the output

Examples

Example 1:

=currentdate("America/Chicago", "The day of the week is %A") = The day of the week is Tuesday

Example 2:

=currentdate() = 2021-05-04UTC

CurrentDateTime

Formula

=currentdatetime([timezone], [output_format])

Description

Outputs the current date and time for the timezone and datetime format given.

Arguments

Argument

Required (Y/N)

Description

timezone

N

Desired timezone of the output

output_format

N

Datetime format of the output

Examples

Example 1:

=currentdate("America/Chicago", "The day of the week is %A") = The day of the week is Tuesday

Example 2:

=currentdate() = 2021-05-06 02:01:49.317275816

Example 3:

=currentdatetime("America/Chicago", "%Y %m %d %H:%M:%S") = 2021 05 25 17:58:25

CurrentTime

Formula

=currenttime([timezone], [output_format])

Description

Outputs the current time for the timezone and time format given.

Arguments

Argument

Required (Y/N)

Description

timezone

N

Desired timezone of the output

output_format

N

Time format of the output

Examples

Example 1:

=currenttime() = 14:26:36

Example 2:

=currenttime("America/Chicago", "%H:%M:%S") = 02:01:49

Date

Formula

=date(input, [input_format], [output_format])

Description

Attempts to convert the input value into a date format.

Arguments

Argument

Required (Y/N)

Description

input

Y

Value in which the formula will attempt to convert to a date format

input_format

N

Date format of the input value

output_format

N

Desired date format of the output

Examples

Example 1:

=date($"DOB") = 1982-06-03

Example 2:

=date($"Birthdays", "%m/%d/%C", "%Y-%m-%d") = 1982-06-03

Example 3:

=date($"PurchaseDate", ,"%m/%d/%Y") = 06/22/2020

DateTime

Formula

=datetime(input, [input_format], [output_format])

Description

Attempts to convert the input value to a datetime format.

Arguments

Argument

Required (Y/N)

Description

input

Y

Value in which the formula will attempt to convert to a datetime format

input_format

N

Date format of the input value

output_format

N

Desired datetime format of the output

Examples

Example 1:

=datetime("10/20/2020 10:22 PM") = 2020-10-20 22:22:00

Example 2:

=datetime(currentdatetime(),,"%Y-%m-%d %H:%M:%S") = 2021-04-06 14:19:16

Time

Formula

=time(input, [input_format], [output_format])

Description

Attempts to convert the input value to a time format.

Arguments

Argument

Required (Y/N)

Description

input

Y

Value in which the formula will attempt to convert to a time format

input_format

N

Time format of the input value

output_format

N

Desired time format of the output

Examples

Example 1:

=time("10/20/2020 10:22 PM") = 22:22:00

Example 2:

= time($"Time of Purchase")=03:16:09

Example 3:

=time(concat($"hours",":", $"minutes",":", $"seconds"))= 09:33:18