I want to take date as input and query all records that are created on that same date

Options

The created at field is timestamp in xano . not allowing to compare only date

Answers

  • Lachlan
    Lachlan Administrator

    ADMIN

    edited November 2023
    Options

    Hey there!

    It sounds like you might want to use the parse_timestamp filter for that - Parse Timestamp

    Let me know if that doesn't work!

  • Abhilasha
    Options

    Thank you. but not getting that filter in where condition. in configure search custom query part

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    If you are looking to filter in the database, you want to figure out what time range you want. Keep in mind that date is a matter of local representation. So what you really mean is this date in a particular time zone. So you could create a couple of variables to parse the date for the midnight of today and themidnight of tomorrow for your reference time zone, and then make your query filter greater than one value and less than the other.

    But that's all a lot of ceremony for what will be a slow query. You might consider changing the field in the table to a date instead of a timestamp (or to store both) that way the lookup can be both easy and fast.