Happy Business Starts Here

Date Formats

Kate
Zuora Staff

Date Formats

How to write date or do date conversion in data query?

 

Example of today's date

DATE(NOW())

Example of using the date

select id from account where updatedDate > date '2020-01-01'

Example of date conversion

select id from account where date_format(account.updatedDate, '%m-%d-%Y') > '01-01-2020'