UTCNOW function in Amazon QLDB
Important
End of support notice: Existing customers will be able to use Amazon QLDB until end of support on 07/31/2025. For more details, see
Migrate an Amazon QLDB Ledger to Amazon Aurora PostgreSQL
In Amazon QLDB, use the UTCNOW
function to return the current time in
Coordinated Universal Time (UTC) as a timestamp
.
Syntax
UTCNOW()
This function requires that you specify a FROM
clause in a
SELECT
query.
Arguments
None
Return type
timestamp
Examples
SELECT UTCNOW() FROM << 0 >> -- 2019-12-27T20:12:16.999Z SELECT UTCNOW() FROM Person WHERE GovId = 'LEWISR261LL' -- 2019-12-27T20:12:26.999Z INSERT INTO Person VALUE { 'firstName': 'Jane', 'createdAt': UTCNOW() } UPDATE Person p SET p.updatedAt = UTCNOW() WHERE p.firstName = 'John'