Datetime Variables

The expression language provides datetime variables for use in expressions.

You can use datetime variables to configure an Amazon S3 destination to write records to a time-based partition prefix or to a time-based index.

The expression language provides the following datetime variables:

  • ${YYYY()} - four digit year
  • ${YY()} - two digit year
  • ${MM()} - two digit month
  • ${DD()} - two digit date
  • ${hh()} - two digit hour
  • ${mm()} - two digit minute
  • ${ss()} - two digit second
When you use datetime variables in most stages, use all of the datetime variables between one of the year variables and the smallest variable that you want to use. For example, to create buckets on a daily basis for an Amazon S3 destination, use a year variable, a month variable, and then a day variable. You might use one of the following datetime variable progressions to define the Bucket property:
${YYYY()}-${MM()}-${DD()}
${YY()}_${MM()}_${DD()}