Date format in REST API?

hello there

I wonder what’s the right format for the date to pass in the REST API?

See here; but generally we use ISO 8601 (eg. 2022-03-21T11:00:01Z)

2 Likes

corteza stores the times in GMT timezone … is that right?

Record values are internally stored as RFC3339 in UTC; e.g.: 2006-01-02T15:04:05Z.
Record values go over a sanitizer that assurres the values are valid so you shouldn’t need to wory about it.

1 Like

@tjerman I’m facing an issue when I’m trying to read records

I want for example to read all records created after 2022
so I wrote this in the query parameter
DATE(createdAt) > DATE(‘2022-01-01T00:00:00Z’)

but it doesn’t work!

appreciate your help

What database are you using? DATE(createdAt) >= ‘2022-01-01’ should work but I’ll take a look to validate it works as expected

1 Like

@tjerman thanks, it works

1 Like