Below is a list of all DynamoDB data types and examples of how to represent those types in queries.
DQL has some limited support for timestamp types. These will all be converted to Unix timestamps under the hood.
TS()- parses the timestamp in your local timezone
UTCTS()- parses the timestamp as UTC
NOW()- Returns the current timestamp
You can also add/subtract intervals from a timestamp
NOW() - INTERVAL("1 day")
NOW() + INTERVAL "1y 2w -5 minutes"
You can wrap any of these with
MS() to convert the result into milliseconds
instead of seconds.
MS(NOW() + INTERVAL '2 days')
Below is a list of all keywords that you can use for intervals