datetime() Function
This function may not be compatible with all features of Appian. For details, see the Feature Compatibility section below.

Function

datetime( year, month, day, hour, minute, second )

Converts the given Date and Time into a serial number that holds the Date and Time data type.

Parameters

Keyword Type Description

year

Integer

The year of the you would like to convert into a serial number.

month

Integer

Only numbers are accepted, not month names. Do not include leading zeroes for a month with one digit.

day

Integer

The day of the Date and Time.

hour

Integer

The hour of the Date and Time.

minute

Integer

The minute of the Date and Time.

second

Integer

The seconds of the Date and Time.

Returns

Date and Time

Usage considerations

The value is converted to GMT when stored.

Examples

datetime(2011,2,28,12,0,0) returns 2/28/2011 7:00 AM EST

Appending a Time to a Date:

datetime(year(pv!yourDate), month(pv!yourdate), day(pv!yourDate), 23, 59, 00) returns 6/8/1984 7:59 PM EDT by adding the time 11:59 pm to a given date where pv!yourDate is 6/8/1984 and applying the timezone conversion.

See Also

userdatetime(): Use this function to return a Datetime value in the local time zone.

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Compatible
Offline Mobile Compatible
Custom Record Field Expressions Compatible
Open in Github Built: Fri, Aug 05, 2022 (02:40:39 PM)

On This Page

FEEDBACK