Can't Filter Table with DateTimePicker

I need to make the datetimepicker work as a filter on a table pulling datetimes. However, I only need to filter on dates, not on times.

The data source includes times (that aren’t all the same), and the datetimepicker can be set up to only use dates (I think). I figured I could shave off the time part of the date with something like CONVERT(SL.shipment_date, getdate()) and/or moment.utc(SL.shipment_date).format('MMMM D, YYYY') but neither are working.

I’ve found a workaround for the time being, but I don’t like it. Here is the workaround:

  1. Use CONVERT(varchar(10), SL.shipment_date to get the date into a string.
  2. Instead of datetimepicker1.value, use datetimepicker1.formattedString so I can compare strings.

This formats the query result and the thing to which it compares to both be strings.

The problem with this is that the datetimepicker isn’t the nice MM/DD/YYYY that we are used to. It is this unattractive, non-intuitive thing:
2021-04-06 10_44_44-NSLP Qty Dist

I need a way to bring in the datetime in my query and compare it to the datetimepicker as a date, not as a string.

Thanks, y’all!

Hey @mathfour! Using Moment is working for me (example below) - are you getting an error on your end?

There is no error, it just doesn’t work.

I tried moment.js and it returns no rows:
image

I’m not sure you understood my question, though. I need to filter when shipment_date = datetimepicker_shipment_date. The shipment date is in a datetime format:
image

Since the Retool datetimepicker’s value is also in datetime format, I would think my code above (with moment.js) should work, the only problem being the times involved:
image

I have tried various ways to pull in the date, but I can find the flavor of SQL that Retool uses:
image

There are a number of possible solutions here, I’ve tried all the ones I can think of. Please help.

Thanks @Tess for helping me out on this one via chat. I’m posting the solution that finally worked, although there’s another strange time issue now (that you can see here: Query of dates use time zones... but only sometimes!).

I can use this to filter:

Then use this to select and display:
image

And keep my datetimepicker looking nice:
image