LogoLogo
Changelog
18.5
18.5
  • Welcome
    • Welcome to Airkit πŸ‘‹
    • Quickstart
  • Concepts
    • Sessions
      • Linking to Sessions
    • Actors
      • Conversations with Actors
  • Tutorials
    • Building A Contact Form
      • Building the Web UI
      • Building the Database
      • Finalizing the App
      • Connecting Forms to Salesforce
    • Styles, Themes, and Templates
      • Changing the header
      • Changing the Theme
      • Using a custom font
      • Using Animations
    • Multi-Page Form
      • Creating the App Object in AirData
      • Building the Form’s UI
      • Creating the Data Flow to insert data
      • Connecting the Data Flow to the UI
      • Previewing and Publishing the app
    • Scheduling and Follow-Up App
      • Collecting Contact Information
      • Creating Appointment Times
      • Saving Appointment Information
      • Scheduling Appointment Reminder
      • Automating Proactive Follow-Up
      • Requesting Feedback
    • Custom Integrations (Petfinder App)
      • Querying the Petfinder API
      • Displaying Petfinder Data
  • Platform
    • Console
      • Apps
      • Activity
      • App Health
      • Datastores
      • Integrations
      • Conversations
      • Resources
      • API
      • Settings
    • Studio
      • Builder Bar
        • Triggers Builder
        • Web Flows Builder
        • Chat Bots Builder
        • Answer Flows Builder
        • Voice Bots Builder
        • Connections Builder
        • Notifications Builder
        • AirData Builder
        • Media Library
        • Theme Builder
        • Schedules Builder
        • Settings
      • App Preview
      • Data Flows
      • Variable Tree
      • Data Model Editor
      • Events
        • Session Started Events
        • Trigger Events
        • Control Events
        • Session Events
        • Activity Group Events
        • Action Chains
  • Data and Integrations
    • Working with Data
      • Variable Namespaces
      • Standard Session Data
      • AirData
        • AirData App Objects
        • Datastores
        • Identity Objects
        • Place Objects
        • Schedule Objects
      • Airscript Quickstart
        • Working with Dates and Times
        • Working with Missing Values
        • Working with URLs and Base64
      • Pull Values from Lists and Objects
        • Path Expressions
        • Query Expressions
      • Making Forms from Data Models
    • Integrations
      • First Party Integrations
        • Creating A Salesforce Lead
        • Creating a Zendesk Ticket
        • Creating SFTP Credentials
        • Swagger Schema Validation
        • First Party Integration Reference
          • Airtable Integration
          • Genesys Widget Integration
          • Google Integration
          • Guidewire Integration
          • Hubspot Integration
          • Kustomer Integration
          • MX Integration
          • Plaid Integration
          • Salesforce Integration
          • SendGrid Integration
          • SFTP Integration
          • Shopify Integration
          • Stripe Integration
          • Twilio Integration
          • Zendesk Integration
      • Custom Integrations
        • OAuth 2.0
        • API Token
        • HTTP Basic Auth
        • Custom Token
        • SFTP
        • Examples: Twitter and Giphy
      • App APIs
        • Building an App API
      • Subscriptions (Web Hooks)
  • Texts, Calls and Emails
    • SMS
      • SMS Notification Basics
      • Chat Bot Basics
      • Texting Journey Links
      • Data from Inbound Calls/SMS
      • Connecting Twilio Numbers
    • Emails
      • Email Notification Basics
      • Sending Emails by Data Operation
      • Connecting Email Addresses
    • Voice Bots
      • Voice Bot Basics
    • Conversation Chat Bots
      • Setting Up Answer Groups
      • Configuring Conversation Chat Bots
        • Salesforce Relays
        • Kustomer Relays
  • Web Apps
    • Forms
      • Displaying Controls Dynamically
      • Repeating Elements
      • Prefilling Forms
      • Validation of User Data
      • Capture Secure User Data
      • Progress Bars
      • Dropdown Menus
      • Electronic Signatures
    • Calendars
      • Customizing Schedule Availability
      • Using Availability Schedules
      • Rescheduling Deflected Calls
      • Integrating to External Calendars
    • Maps and Addresses
      • Maps
      • Addresses
      • User's Current Location
      • Address Search Map Binding
    • Payments
      • Creating a Stripe Integration
    • Timers and Reminders
      • Setting Timers
      • Setting up Periodic Tasks
    • PDFs
      • Creating a PDF
      • Working with Existing PDFs
      • Adding Assets to PDF
    • Assets and Media
      • Using the File Upload Web Control
      • Working with Files and Media
      • Assets and Data Operations
      • Sending Assets to Remote Servers
    • Styling Overview
      • Web Control Styling Properties
        • Animations
      • Themes and Control Variants
        • Importing and Exporting Themes
      • Working with Custom Assets
      • Page Layouts
        • Creating an App Header
    • Publishing
      • Publish and Manage Deployments
      • Configure Application Resources
      • Editing an Application
      • Importing/Exporting Apps
      • Tying Variables to Deployments
    • Advanced
      • Custom Controls
      • Creating Custom Functions
    • Accessibility
      • Accessibility in Airkit
      • Connecting Labels to Input Controls
  • Authentication
    • SAML Authentication
    • OAuth 2.0 - Google
    • OAuth 2.0 - Okta
    • OAuth 2.0 - Auth0
    • Azure AD B2C
    • Authentication Apps and Secure Apps
  • Embeds
    • SDK Overview
      • SDK Quickstart
      • SDK Authentication
      • Passing Data
      • Configuration
      • Configuration Examples
      • Airkit Lightning Component (Salesforce)
  • Analytics and Administration
    • Airkit Organizations
    • Adding Users to Airkit
    • User Roles
      • Working with Custom Roles
    • JIT Provisioning for an Organization
    • SAML SSO for an Organization
    • Managing the Application Lifecycle
    • Environments
      • Environmental Governance
    • Getting Application Metadata
    • Custom Domains
    • Analytics Overview
      • App Events to Splunk
      • App Events to AWS S3 Buckets
      • Audit Logs to AWS S3 Buckets
      • View Data in Activity Explorer
      • Snowflake Analytics Schema
      • Power BI
      • Heap and GTM Integrations
        • Setting up Analytics with GTM
        • Setting up Analytics with Heap
    • Error Management
      • Logging Errors
      • Setting up Email Notifiers
      • Integrating Error Notifiers to Slack
  • Security and Compliance
    • App Security FAQ
    • Data Masking and Auditing
    • IP Ranges
    • Encrypting Data
    • SSL Auth
    • TCPA
    • Cookie Policies
    • Supported Browsers
    • Realms
  • Reference Docs
    • Reference Documentation Overview
    • Airscript
      • Text Functions
        • CAPITALIZE
        • CONCAT
        • ISSTRING
        • LOWERCASE
        • PADSTRING
        • REPLACE
        • REPT
        • SPLIT
        • STRING_COMPARE
        • STRING_FIND
        • STRIP
        • SUBSTITUTE
        • SUBSTRING
        • TITLECASE
        • TRIM
        • UPPERCASE
      • DateTime Functions
        • ADD_TO_DATE
        • ADD_TO_DATETIME
        • DATE
        • DATETIME
        • DATETIME_DELTA
        • DATETIME_FROM_FORMAT
        • DATETIME_FROM_TIMESTAMP
        • DATE_DELTA
        • DATE_FROM_DATETIME
        • DATE_FROM_FORMAT
        • DAY
        • DAYS
        • FORMAT_DATE
        • FORMAT_DATETIME
        • FORMAT_TIME
        • HOUR
        • ISO_WEEK
        • MINUTE
        • MONTH
        • NOW
        • SECOND
        • SUBTRACT_FROM_DATE
        • SUBTRACT_FROM_DATETIME
        • TIME
        • TIMESTAMP_FROM_DATETIME
        • TIME_DELTA
        • TIME_FROM_DATETIME
        • TIME_FROM_FORMAT
        • TODAY
        • UPDATE_DATE
        • UPDATE_DATETIME
        • UPDATE_DAY
        • UPDATE_HOUR
        • UPDATE_MILLISECOND
        • UPDATE_MINUTE
        • UPDATE_MONTH
        • UPDATE_SECOND
        • UPDATE_TIME
        • UPDATE_TIMEZONE
        • UPDATE_YEAR
        • WEEK
        • WEEKDAY
        • YEAR
      • List Functions
        • CONTAINS
        • FIRST
        • FLAT
        • JOIN
        • LAST
        • LENGTH
        • REMOVE_EMPTY
        • REVERSE
        • SHUFFLE
      • Object Functions
        • KEYS
        • MERGE_OBJECTS
        • OBJECT_TO_SOAP
        • OBJECT_TO_XML
        • SOAP_TO_OBJECT
        • SOAP_HEADER_TO_OBJECT
        • VALUES
        • XML_TO_OBJECT
      • Math Functions
        • ABS
        • ACOS
        • ACOSH
        • ACOT
        • ACOTH
        • ASIN
        • ASINH
        • ATAN
        • ATAN2
        • ATANH
        • CEILING
        • COMBIN
        • COMBINA
        • COS
        • COSH
        • COT
        • COTH
        • CSC
        • CSCH
        • DEGREES
        • EVEN
        • EXP
        • FACT
        • FACTDOUBLE
        • FLOOR
        • GCD
        • ISEVEN
        • ISNUMBER
        • ISODD
        • LATLNGDISTANCE
        • LCM
        • LN
        • LOG
        • MAX
        • MIN
        • MROUND
        • MULTINOMIAL
        • ODD
        • PI
        • POWER
        • PRODUCT
        • RADIANS
        • RANDOM
        • RANGE
        • ROUND
        • ROUNDDOWN
        • ROUNDUP
        • SEC
        • SECH
        • SIGN
        • SIN
        • SINH
        • SQRT
        • SQRTPI
        • SUM
        • SUMSQ
        • TAN
        • TANH
        • TRUNC
      • Conditional Functions
        • EQUAL
        • IF
        • ISEMPTY
        • ISNOTEMPTY
        • NOT
      • Currency Functions
        • CURRENCY
        • FORMAT_CURRENCY
        • PARSE_CURRENCY
      • Phone Functions
        • FORMAT_PHONE
        • ISPHONE
        • PARSE_PHONE
      • Email Functions
        • ISEMAIL
      • Number Formatting Functions
        • ARABIC
        • FORMAT_NUMBER
        • PARSE_NUMBER
        • ROMAN
      • Data Type Functions
        • FROM_JSON
        • TO_JSON
        • TYPEOF
      • Asset Functions
        • ASSET_SIZE
        • ASSET_STATE
        • ASSET_THUMBNAIL_URL
        • ASSET_TO_URI
        • ASSET_TYPE
        • URI_TO_ASSET
      • Encoding Functions
        • BASE
        • BASE64_DECODE
        • BASE64_ENCODE
        • HMAC_MD5
        • HMAC_SHA1
        • HMAC_SHA256
        • MD5
        • SHA1
        • SHA256
        • URL_DECODE
        • URL_ENCODE
        • UUID
        • VALUE_OF
      • Error Handling Functions
        • THROW
        • TRY
      • Form and Validation Functions
        • FIRST_VALIDATION
        • RUN_VALIDATIONS
      • Arithmetic Operators
        • Addition (+)
        • Subtraction (-)
        • Multiplication (*)
        • Division (/)
        • Remainder (%)
      • Comparison Operators
        • Equality (=)
        • Inequality (<>, !=)
        • Ordering (<, <=, > , >=)
      • Logical Operators
        • AND
        • OR
        • XOR
        • Null Coalescing Operator (??)
      • Advanced Expressions
        • LET...IN
        • User Defined Functions
    • Web Controls
      • Button
      • Checkbox
      • Chat
      • Simple Checkbox List
      • Container
      • Container List
      • Credit Card
      • Currency Input
      • Date Input
      • Date Picker
      • Dropdown List
      • Email Input
      • Embedded External Content (iFrame)
      • Fieldset Container
      • File Upload
      • Form
      • Hyperlink
      • Image
      • Inline Container
      • Label
      • Map
      • Markdown
      • Number Input
      • Payment Request Button
      • Phone Input
      • Place Search Input
      • Progress Bar
      • QR Code
      • Radio Button
      • Simple Radio List
      • Scheduler
      • Secure String Input
      • Selectable Container
      • Signature Input
      • Text Area
      • Text Input
      • Time Input
      • Web Flow
      • Web Page
    • Voice and Chat Controls
      • Decision Menu
      • Forward Call
      • Secure Touchtone Capture
      • Text Response Capture
      • Touchtone Capture
    • Data Operations
      • AirData Request
        • DELETE
        • PUT
        • INSERT
        • PATCH
        • QUERY
        • DEPRECATED_QUERY
      • Calendar Search
      • Close Conversation
      • Conversation Transcript
      • Create File
      • Delete Assets
      • Download Encoded Asset
      • Early Return
      • Fetch Agent Information
      • Fetch Asset Details
      • Fetch Routing Flow Stats
      • Find Conversations by Customer Identifier
      • Fill PDF Form
      • Google
      • HTML to PDF
      • HTTP Request
        • Using an API With Paging
      • JWT Generation
      • Merge PDF
      • Move Conversation to Routing Flow
      • Opt Out Search
      • Opt Out List
      • Run Data Flow
      • Run Event in Journey
      • Salesforce
      • Secure Value Retrieval
      • Send Email
      • Send Message to Conversation
      • SFTP
      • Start Journey
      • Swagger Schema Validation
      • Transform
      • Update Customer Identifier
      • Wait
      • XML to JSON
      • Zendesk
      • ZIP File
    • Actions
      • Analytics Identify
      • Analytics Send Event
      • Close Modal
      • Condition
      • End Session
      • Extend Session Expiration Time
      • Initialize Actor
      • Log Custom Event
      • Metric: Count
      • Metric: Field
      • Metric: Start Timer
      • Metric: Statistic
      • Metric: Stop Timer
      • Navigate To Web Flow
      • Navigate to Web Page
      • Open Modal
      • Run Data Flow
      • Run Data Flow Repeatedly
      • Run Embedded Outgoing Event
      • Run Event
      • Send Email
      • Send SMS
      • Set Authentication
      • Set Identifier
      • Set Variable
      • Start Chat Bot
      • Start Voice Bot
      • Start Timer
      • Stop Timer
      • Throw
      • Trigger Form Validation
      • Try
    • Conversation Actions
      • Ask A Question
      • Capture User Response
      • Close Conversation
      • Move Customer to Resource
      • Move Conversation to Routing Flow
      • Quick Replies
      • Run Answer Flow
      • Start Conversation Chat Bot
      • Start Conversation
      • Send Link
      • Text Answer
      • Update Customer Identifier
    • Primitive Data Types
      • Any (JSON)
      • Asset
        • Detailed Asset
      • Boolean
      • Currency
      • Date
      • DateTime
      • Email
      • List
      • Null
      • Number
      • Phone
      • Text
      • Time
  • Transportation Products Catalog
    • The Transportation Products API
      • GET products
      • GET product-by-id
  • Release Notes
    • CXR Overview
    • CXR Upgrades and Migrations
Powered by GitBook
On this page
  • Dates
  • Basic Applications
  • Times
  • Basic Applications
  • DateTimes
  • Basic Applications
  • Timers
  • Scheduling
  • Additional Resources
  • Time Unit Values
  • Date and Time Formatting Options
  • Supported Time Zones

Was this helpful?

  1. Data and Integrations
  2. Working with Data
  3. Airscript Quickstart

Working with Dates and Times

PreviousAirscript QuickstartNextWorking with Missing Values

Last updated 1 year ago

Was this helpful?

Airkit stores data regarding dates and times in specialized data types: the objects , , and . Using these specialized objects in tandem with the Airkit platform allows Airkit to handle the notorious complexities of time-tracking under the hood.

Dates

A Date object represents a particular calendar day. It consists of three properties:

  • day (number) - the day of a month, where indexing begins at 1 with January

  • month (number) - the month of a year, where 1 represents January, whereas 12 represents December

  • year (number) - a year

For example, a Date representing June 16, 2022 would be given as:

{
  "day": 16,
  "month": 6,
  "year": 2022
}

Basic Applications

For the sake of example, assume all the following Airscript expressions have access to the following Date, example_date, which represents December 30th, 2021:

example_date = {
  "day": 30,
  "month": 12,
  "year": 2021
}

On the surface, example_date behaves like any other object, the properties of which are accessible via dot notation. For instance, the value of the "day" property is accessible as follows:

example_date.day ->  30

However, the true power of Date objects is in using them in tandem with parts of the Airkit platform that expect not just any object, but the special data type, Date.

FORMAT_DATE(example_date, "MMMM Do, YYYY") ->  "December 30th, 2021"
ADD_TO_DATE(example_date, 2, "days") -> {
  "day": 1,
  "month": 1,
  "year": 2022
}

Times

A Time object represents a time of day. It consists of four properties:

  • hour (number) - an hour of a day represented by a 24-hour clock

  • minute (number) - the number of minutes into the hour

  • second (number) - the number of seconds into the minute

  • ** millisecond** (number) - the number of milliseconds into the second

For example, a Time representing 3:11 pm and 34 seconds would be given as:

{
  "hour": 15,
  "minute": 11,
  "second": 34,
  "millisecond": 0
}

Basic Applications

For the sake of example, assume all the following Airscript expressions have access to the following Time, example_time, which represents 11:15 pm and 30 seconds:

example_time = {
  "hour": 23,
  "minute": 15,
  "second": 30,
  "millisecond": 0
}

On the surface, example_time behaves like any other object, the properties of which are accessible via dot notation. For instance, the value of the "hour" property is accessible as follows:

example_time.hour ->  23

However, the true power of Time objects is in using them in tandem with parts of the Airkit platform that expect not just any object, but the special data type, Time.

FORMAT_TIME(example_time, "h:mm a") ->  "11:15 pm"

DateTimes

A DateTime object represents a single moment in time: a certain time on a certain date. It can serve the same functions as a timestamp.

A DateTime object consists of three properties:

  • date (Date) - a Date object, consisting of "day", "month", and "year" properties

  • time (Time) - a Time object, consisting of "hour", "minute", "second", and "millisecond" properties

  • timeZone (string, timezone abbreviation) - the timezone to which the date and time properties refer, tends to default to "UTC".

For example, a DateTime representing June 21, 2022, 9:34am and 48 seconds in UTC would be given as:

{
  "date": {
    "day": 21,
    "month": 6,
    "year": 2022
  },
  "time": {
    "hour": 9,
    "minute": 34,
    "second": 48,
    "millisecond": 0
  },
  "timeZone": "UTC"
}

Basic Applications

For the sake of example, assume all the following Airscript expressions have access to the following Date, example_datetime, which represents June 21, 2022, 9:34am and 48 seconds in UTC:

example_datetime = {
  "date": {
    "day": 21,
    "month": 6,
    "year": 2022
  },
  "time": {
    "hour": 9,
    "minute": 34,
    "second": 48,
    "millisecond": 0
  },
  "timeZone": "UTC"
}

On the surface, example_datetime behaves like any other object, the properties of which are accessible via dot notation. For instance, the value of the "hour" property nested under the "time" property is accessible as follows:

example_datetime.time.hour ->  9

However, the true power of DateTime objects is in using them in tandem with parts of the Airkit platform that expect not just any object, but the special data type, DateTime.

FORMAT_DATETIME(example_datetime, "MM/DD/YY h:mm A z") ->  "06/21/22 9:34 AM UTC"

DateTime objects can also be converted into strings that display the described moment in time in a more relevant timezone. The following example takes example_datetime and returns the described date and time not in UTC, but CDT:

FORMAT_DATETIME(
  example_datetime,
  "MM/DD/YY h:mm A z",
  "en-EN",
  "America/Chicago"
) -> "06/21/22 4:34 AM CDT"

Note how the time changes to reflected the changes in timezone. DateTime objects are a special time of object, capable of handling the complexities of timezone changes under the hood.

TIMESTAMP_FROM_DATETIME(example_datetime) -> 1655804088000

Timers

ADD_TO_DATETIME(NOW(), 5, "minute")
SUBTRACT_FROM_DATETIME(appointment_time, 1, "hour")

Scheduling

When stored as local variables, these start and end DateTime values can be used like any other DateTime object to, for instance:

Additional Resources

** Want to learn by building?** πŸ› οΈ Check out our long-form tutorial:

Time Unit Values

Time Unit
Possible Values

Year

"year", "years", "y"

Month

"month", "months", "M"

Week

"week", "weeks", "w"

Day

"day", "days", "d"

Hour

"hour", "hours", "h"

Minute

"minute", "minutes", "m"

Second

"second", "seconds", "s"

Millisecond

"millisecond", "milliseconds", "ms"

Date and Time Formatting Options

Unit
Token
Output

Month

M

1 2 ... 11 12

Mo

1st 2nd ... 11th 12th

MM

01 02 ... 11 12

MMM

Jan Feb ... Nov Dec

MMMM

January February ... November December

Quarter

Q

1 2 3 4

Qo

1st 2nd 3rd 4th

Day of Month

D

1 2 ... 30 31

Do

1st 2nd ... 30th 31st

DD

01 02 ... 30 31

Day of Year

DDD

1 2 ... 364 365

DDDo

1st 2nd ... 364th 365th

DDDD

001 002 ... 364 365

Day of Week

d

0 1 ... 5 6

do

0th 1st ... 5th 6th

dd

Su Mo ... Fr Sa

ddd

Sun Mon ... Fri Sat

dddd

Sunday Monday ... Friday Saturday

Day of Week (Locale)

e

0 1 ... 5 6

Day of Week (ISO)

E

1 2 ... 6 7

Week of Year

w

1 2 ... 52 53

wo

1st 2nd ... 52nd 53rd

ww

01 02 ... 52 53

Week of Year (ISO)

W

1 2 ... 52 53

Wo

1st 2nd ... 52nd 53rd

WW

01 02 ... 52 53

Year

YY

70 71 ... 29 30

YYYY

1970 1971 ... 2029 2030

Y

1970 1971 ... 9999 +10000 +10001

Week Year

gg

70 71 ... 29 30

gggg

1970 1971 ... 2029 2030

Week Year (ISO)

GG

70 71 ... 29 30

GGGG

1970 1971 ... 2029 2030

AM/PM

A

AM PM

a

am pm

Hour

H

0 1 ... 22 23

HH

00 01 ... 22 23

h

1 2 ... 11 12

hh

01 02 ... 11 12

k

1 2 ... 23 24

kk

01 02 ... 23 24

Minute

m

0 1 ... 58 59

mm

00 01 ... 58 59

Second

s

0 1 ... 58 59

ss

00 01 ... 58 59

Fractional Second

S

0 1 ... 8 9

SS

00 01 ... 98 99

SSS

000 001 ... 998 999

SSSS ... SSSSSSSSS

000[0..] 001[0..] ... 998[0..] 999[0..]

Time Zone

z or zz

EST CST ... MST PST

Z

-07:00 -06:00 ... +06:00 +07:00

ZZ

-0700 -0600 ... +0600 +0700

Unix Timestamp

X

1360013296

Unix Millisecond Timestamp

x

1360013296123

For instance, the format of "September 28th, 2021, 4:52 PM" is "MMMM Do, YYYY, h:mm A".

Supported Time Zones

Time Zones

Africa/Abidjan

Africa/Accra

Africa/Nairobi

Africa/Algiers

Africa/Lagos

Africa/Bissau

Africa/Maputo

Africa/Cairo

Africa/Casablanca

Africa/Ceuta

Africa/El_Aaiun

Africa/Johannesburg

Africa/Juba

Africa/Khartoum

Africa/Monrovia

Africa/Ndjamena

Africa/Sao_Tome

Africa/Tripoli

Africa/Tunis

Africa/Windhoek

America/Adak

America/Anchorage

America/Port_of_Spain

America/Araguaina

America/Argentina/Buenos_Aires

America/Argentina/Catamarca

America/Argentina/Cordoba

America/Argentina/Jujuy

America/Argentina/La_Rioja

America/Argentina/Mendoza

America/Argentina/Rio_Gallegos

America/Argentina/Salta

America/Argentina/San_Juan

America/Argentina/San_Luis

America/Argentina/Tucuman

America/Argentina/Ushuaia

America/Curacao

America/Asuncion

America/Atikokan

America/Bahia_Banderas

America/Bahia

America/Barbados

America/Belem

America/Belize

America/Blanc-Sablon

America/Boa_Vista

America/Bogota

America/Boise

America/Cambridge_Bay

America/Campo_Grande

America/Cancun

America/Caracas

America/Cayenne

America/Panama

America/Chicago

America/Chihuahua

America/Costa_Rica

America/Creston

America/Cuiaba

America/Danmarkshavn

America/Dawson_Creek

America/Dawson

America/Denver

America/Detroit

America/Edmonton

America/Eirunepe

America/El_Salvador

America/Tijuana

America/Fort_Nelson

America/Fort_Wayne

America/Fortaleza

America/Glace_Bay

America/Godthab

America/Goose_Bay

America/Grand_Turk

America/Guatemala

America/Guayaquil

America/Guyana

America/Halifax

America/Havana

America/Hermosillo

America/Indiana/Knox

America/Indiana/Marengo

America/Indiana/Petersburg

America/Indiana/Tell_City

America/Indiana/Vevay

America/Indiana/Vincennes

America/Indiana/Winamac

America/Inuvik

America/Iqaluit

America/Jamaica

America/Juneau

America/Kentucky/Louisville

America/Kentucky/Monticello

America/La_Paz

America/Lima

America/Los_Angeles

America/Maceio

America/Managua

America/Manaus

America/Martinique

America/Matamoros

America/Mazatlan

America/Menominee

America/Merida

America/Metlakatla

America/Mexico_City

America/Miquelon

America/Moncton

America/Monterrey

America/Montevideo

America/Toronto

America/Nassau

America/New_York

America/Nipigon

America/Nome

America/Noronha

America/North_Dakota/Beulah

America/North_Dakota/Center

America/North_Dakota/New_Salem

America/Ojinaga

America/Pangnirtung

America/Paramaribo

America/Phoenix

America/Port-au-Prince

America/Rio_Branco

America/Porto_Velho

America/Puerto_Rico

America/Punta_Arenas

America/Rainy_River

America/Rankin_Inlet

America/Recife

America/Regina

America/Resolute

America/Santarem

America/Santiago

America/Santo_Domingo

America/Sao_Paulo

America/Scoresbysund

America/Sitka

America/St_Johns

America/Swift_Current

America/Tegucigalpa

America/Thule

America/Thunder_Bay

America/Vancouver

America/Whitehorse

America/Winnipeg

America/Yakutat

America/Yellowknife

Antarctica/Casey

Antarctica/Davis

Antarctica/DumontDUrville

Antarctica/Macquarie

Antarctica/Mawson

Pacific/Auckland

Antarctica/Palmer

Antarctica/Rothera

Antarctica/Syowa

Antarctica/Troll

Antarctica/Vostok

Europe/Oslo

Asia/Riyadh

Asia/Almaty

Asia/Amman

Asia/Anadyr

Asia/Aqtau

Asia/Aqtobe

Asia/Ashgabat

Asia/Atyrau

Asia/Baghdad

Asia/Qatar

Asia/Baku

Asia/Bangkok

Asia/Barnaul

Asia/Beirut

Asia/Bishkek

Asia/Brunei

Asia/Kolkata

Asia/Chita

Asia/Choibalsan

Asia/Shanghai

Asia/Colombo

Asia/Dhaka

Asia/Damascus

Asia/Dili

Asia/Dubai

Asia/Dushanbe

Asia/Famagusta

Asia/Gaza

Asia/Hebron

Asia/Ho_Chi_Minh

Asia/Hong_Kong

Asia/Hovd

Asia/Irkutsk

Europe/Istanbul

Asia/Jakarta

Asia/Jayapura

Asia/Jerusalem

Asia/Kabul

Asia/Kamchatka

Asia/Karachi

Asia/Urumqi

Asia/Kathmandu

Asia/Khandyga

Asia/Krasnoyarsk

Asia/Kuala_Lumpur

Asia/Kuching

Asia/Macau

Asia/Magadan

Asia/Makassar

Asia/Manila

Asia/Nicosia

Asia/Novokuznetsk

Asia/Novosibirsk

Asia/Omsk

Asia/Oral

Asia/Pontianak

Asia/Pyongyang

Asia/Qostanay

Asia/Qyzylorda

Asia/Rangoon

Asia/Sakhalin

Asia/Samarkand

Asia/Seoul

Asia/Srednekolymsk

Asia/Taipei

Asia/Tashkent

Asia/Tbilisi

Asia/Tehran

Asia/Thimphu

Asia/Tokyo

Asia/Tomsk

Asia/Ulaanbaatar

Asia/Ust-Nera

Asia/Vladivostok

Asia/Yakutsk

Asia/Yekaterinburg

Asia/Yerevan

Atlantic/Azores

Atlantic/Bermuda

Atlantic/Canary

Atlantic/Cape_Verde

Atlantic/Faroe

Atlantic/Madeira

Atlantic/Reykjavik

Atlantic/South_Georgia

Atlantic/Stanley

Australia/Sydney

Australia/Adelaide

Australia/Brisbane

Australia/Broken_Hill

Australia/Hobart

Australia/Darwin

Australia/Eucla

Australia/Lord_Howe

Australia/Lindeman

Australia/Melbourne

Australia/Perth

CET

Pacific/Easter

CST6CDT

EET

EST

EST5EDT

Etc/GMT-0

Etc/GMT-1

Pacific/Port_Moresby

Etc/GMT-11

Pacific/Tarawa

Etc/GMT-13

Etc/GMT-14

Etc/GMT-2

Etc/GMT-3

Etc/GMT-4

Etc/GMT-5

Etc/GMT-6

Indian/Christmas

Etc/GMT-8

Pacific/Palau

Etc/GMT+1

Etc/GMT+10

Etc/GMT+11

Etc/GMT+12

Etc/GMT+3

Etc/GMT+4

Etc/GMT+5

Etc/GMT+6

Etc/GMT+7

Etc/GMT+8

Etc/GMT+9

Etc/UTC

Europe/Dublin

Europe/Amsterdam

Europe/Andorra

Europe/Astrakhan

Europe/Athens

Europe/London

Europe/Belgrade

Europe/Berlin

Europe/Prague

Europe/Brussels

Europe/Bucharest

Europe/Budapest

Europe/Zurich

Europe/Chisinau

Europe/Copenhagen

Europe/Gibraltar

Europe/Helsinki

Europe/Kaliningrad

Europe/Kiev

Europe/Kirov

Europe/Lisbon

Europe/Luxembourg

Europe/Madrid

Europe/Malta

Europe/Minsk

Europe/Monaco

Europe/Moscow

Europe/Paris

Europe/Riga

Europe/Rome

Europe/Samara

Europe/Saratov

Europe/Simferopol

Europe/Sofia

Europe/Stockholm

Europe/Tallinn

Europe/Tirane

Europe/Ulyanovsk

Europe/Uzhgorod

Europe/Vienna

Europe/Vilnius

Europe/Volgograd

Europe/Warsaw

Europe/Zaporozhye

HST

Indian/Chagos

Indian/Cocos

Indian/Kerguelen

Indian/Mahe

Indian/Maldives

Indian/Mauritius

Indian/Reunion

Pacific/Kwajalein

MET

MST

MST7MDT

Pacific/Chatham

Pacific/Apia

Pacific/Bougainville

Pacific/Chuuk

Pacific/Efate

Pacific/Enderbury

Pacific/Fakaofo

Pacific/Fiji

Pacific/Galapagos

Pacific/Gambier

Pacific/Guadalcanal

Pacific/Guam

Pacific/Honolulu

Pacific/Kiritimati

Pacific/Kosrae

Pacific/Majuro

Pacific/Marquesas

Pacific/Pago_Pago

Pacific/Nauru

Pacific/Niue

Pacific/Norfolk

Pacific/Noumea

Pacific/Pitcairn

Pacific/Pohnpei

Pacific/Rarotonga

Pacific/Tahiti

Pacific/Tongatapu

PST8PDT

WET

Date values can used to generate strings that represent the described date in a more intuitive manner. The following example uses the function to generate "December 30th, 2021" from example_date:

Date values can be modified such that they automatically account for calendar configuration. For instance, if is used to add two days to example_date, this doesn't simply add 2 to the day attribute, it changes the month and year attributes to reference an appropriate date:

For instance, Time values can used to generate strings that represent the described date in a more intuitive manner. The following example uses the function to generate "11:15 pm" from example_time:

DateTime values can used to generate strings that represent the described moment in time in a more intuitive manner. The following example uses the function to generate "06/21/22 9:34 AM UTC" from example_datetime:

This allows DateTime objects to serve the same functions as timestamps. In fact, a DateTime can be easily converted into a timestamp by giving it as input to the function – no other input required:

Similarly, the function can be used to convert a timestamp to a DateTime, which allows timestamps collected by external systems to be used in Airkit apps.

can be used to schedule Actions to take place at some future time. The Execution Time can be defined as a Custom Expression, which expects a DateTime object as input.

To define a DateTime in relation to the current instant in time, you can use the function in tandem with the function. The NOW function returns the DateTime at the instant it was called, and ADD_TO_DATETIME returns a DateTime at some specified instant after the given DateTime. For instance, the following example will return a DateTime specifying an instant in time five minutes from when the expression is called:

Timers can also be set in relation to a future instant in time. For instance, say you've save the time of a future appointment to a DateTime variable called appointment_time. To set a Timer for one hour before the appointment – perhaps to send a reminder – you can use the appointment_time variable in tandem with the function, as follows:

Web Controls allow users to select appointment slots. They automatically save both the start and end time of the appointments as DateTime objects.

Set a to issue a reminder a short time before the appointment.

Confirm the appointment time in a by using it as input in .

Use a to schedule a follow-up once the appointment is finished.

: Learn about scheduling, proactive service, and enforcing TCPA compliance!

There are many functions that require input designating a unit of time. In order to be correctly parsed by the Airscript function, the given string must exactly match one of the possible values given in the following table:

There are many functions that require input designating how a unit of time will be formatted. This by combining the tokens given in the following table:

The following are a list of supported Time Zones that can be used with Airscript functions, such as ), , and other datetime functions.

Date
Time
DateTime
FORMAT_DATE
ADD_TO_DATE
FORMAT_TIME
FORMAT_DATETIME
TIMESTAMP_FROM_DATETIME
DATETIME_FROM_TIMESTAMP
Timers
NOW
ADD_TO_DATETIME
Notification
SUBTRACT_FROM_DATETIME
Scheduler
Timer
SMS Notification
Label
FORMAT_DATETIME
Timer
Email Notification
Airscript
string
Airscript
string
NOW()
UPDATE_TIMEZONE()
FORMAT_DATETIME()
Build a Scheduling App
Build a Scheduling App