Home / All Integrations / Datetime

free

Connect Datetime to your chatbot

Generate dates and timestamps in any common format


Wrapper around the momentjs library to easily generate and format dates. Defaults to current timestamp (UTC). Please refer to momentjs documentation for more information about formatting options.

  • action: for now, can only be "format"
  • date: the date you want to format (defaults to current time)
  • unix: if set to true, returns the number of seconds since epoch
  • unix_ms: if set to true, returns the number of milliseconds since epoch
  • ISO: if set to true, returns the date formatted in ISO8601 format ("2013-02-04T22:44:30.652Z")
  • format: the format you want to apply to the date
    Note: only one of unix, unix_ms, ISO or format can be set. These options will be evaluated in that order.

Usage

App("utils/datetime", action="format", date="12/03/2014 13:37", format="YYYYMMDD")
Discover similar integrations:
HTTP requests
IBAN Validator
QR Code
Regex
Scheduler
SOAP Client
UUID

Join the Community
on Slack Slack

Come and learn all about CSML with other chatbot enthusiasts on the CSML Community Slack! 🤗