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:
CONVERT(varchar(10), SL.shipment_dateto get the date into a string.
- Instead of
datetimepicker1.formattedStringso 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:
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.