AWS Data Pipeline is no longer available to new customers. Existing customers of AWS Data Pipeline can continue to use the service as normal. Learn more
Date and Time Functions
The following functions are available for working with DateTime values. For the
examples, the value of myDateTime
is May 24, 2011 @ 5:10 pm
GMT
.
Note
The date/time format for AWS Data Pipeline is Joda Time, which is a replacement for the
Java date and time classes. For more information, see Joda Time - Class DateTimeFormat
Function | Description |
---|---|
|
Gets the day of the DateTime value as an integer. Example: Result: |
|
Gets the day of the year of the DateTime value as an integer. Example: Result: |
|
Creates a DateTime object for the start of the month in the specified DateTime. Example: Result: |
|
Creates a String object that is the result of converting the specified DateTime using the specified format string. Example: Result: |
|
Gets the hour of the DateTime value as an integer. Example: Result: |
|
Creates a DateTime object, in UTC, with the specified year, month, and day, at midnight. Example: Result: |
|
Creates a DateTime object, in UTC, with the specified year, month, day, hour, and minute. Example: Result: |
|
Creates a DateTime object for the current midnight, relative
to the specified DateTime. For example, where
Example: Result: |
|
Creates a DateTime object that is the result of subtracting the specified number of days from the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of subtracting the specified number of hours from the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of subtracting the specified number of minutes from the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of subtracting the specified number of months from the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of subtracting the specified number of weeks from the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of subtracting the specified number of years from the specified DateTime. Example: Result: |
|
Gets the minute of the DateTime value as an integer. Example: Result: |
|
Gets the month of the DateTime value as an integer. Example: Result: |
|
Creates a DateTime object that is the result of adding the specified number of days to the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of adding the specified number of hours to the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of adding the specified number of minutes to the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of adding the specified number of months to the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of adding the specified number of weeks to the specified DateTime. Example: Result: |
|
Creates a DateTime object that is the result of adding the specified number of years to the specified DateTime. Example: Result: |
|
Creates a DateTime object for the previous Sunday, relative to the specified DateTime. If the specified DateTime is a Sunday, the result is the specified DateTime. Example: Result: |
|
Gets the year of the DateTime value as an integer. Example: Result: |
|
Creates a DateTime object for the previous day, relative to the specified DateTime. The result is the same as minusDays(1). Example: Result: |