Column Type 'Date' without time

It would be great to have a column type that could optionally omit time. I love the 'Date' column type, and its date picker function. However, as datetimes are prone to user-computer confusion, I'd like to be able to hide the time aspect of the datepicker.

Currently the 'Date' column will try to show the time in my local time, UTC-5. This will actually change the date, too.

If the column type 'Date' had an option to omit time (both as an entry and as part of the column's true data), and treat the date as-received, that would do wonders.

1 Like

You should be able to format the date in the Value field for that column

Also check this out
https://docs.retool.com/docs/javascript-in-retool#dates

@51Forge

Hey there! Can I ask what version of Retool you are you on? In the most up to date version of the table component you can choose either Date or Date Time for Column Type. If you already have access to that, is this particular issue with the Date column still occurring?

There are 4 column types devoted to datetime, it could be nice if one such as "date" or "datepicker" could remove the time content on display. The database I work with stores the value as the date (no time component), but here the time is added.

There is one particular issue; the 'date' is being ascribed a UTC time of 0 when queried. The date column then converts the datetime value into my local computer, UTC-5, setting the display date of the column to one day before (e.g. 2021-12-13T19:00:00-05:00 == 2021-12-14T00:00:00Z ).There are ways to circumvent this I know.

@51Forge

Could you confirm what version of Retool you are currently using and if you are on cloud or on prem?

Cloud and pretty sure I am on the most recent version/update that is out in the wild.

@ScottR

Thanks! Would you mind providing one of the raw date values that you are getting back so we can try and reproduce this on our end?

@lauren.gus ??? What do you mean by raw data?

@ScottR

Is this value coming directly from your db: 2021-12-13T19:00:00-05:00?

@lauren.gus No it is not, but there are other instances where I have pulled a date from an API and have formatted data to get the day of the week for example:
for ...{
moment(getDeliveryDatesAvailable.data.next_date[i]).format("dddd")

}

@ScottR

I got mixed up between you and @51Forge, sorry about that! I am seeing now that you were just giving @51Forge more context, thank you for that! :grinning_face_with_smiling_eyes:

@51Forge

Thanks for the feature request, that makes total sense. It sounds like you are already aware, but the workaround in the meantime would be to use JS in a transformer.

Hi all,
The data itself is coming in with a timecode. Here are the column settings
image

And the actual results:

Even when modifying the column to be in utc (such as {{moment(self).utc}} or specifying only to show the date{{moment(self).form('MMM DD, YYYY'), it does not change the time being displayed in my local timezone, which then sets the timecode back 5h, resembling the calendar day prior.

In MS SQL, the 'date' data type does not include a timecode. Here it is created, and then displayed based on browser locale.

My short term fix is simply adding 5h to the timecode so it will the correct calendar day. This has its own drawbacks (e.g. if someone in UTC-8h views it) the wrong calendar day will be on display all the same.

Therefore, if it would be possible to take the date as written, or better yet just omit time whatsoever and take the calendar day as is, that would be great.
Retool Version:2.82.25

1 Like

Same here, annoying that it shows as the time being removed from the table display but charts linked to the table still pull the raw data with time included from dates. Better logic: Pull the formatted data by default and have an option to read the raw data like the download does, per-column.

The retool support people lean heavily on advising that we building tables to work around disparate data formatting styles from multiple sources, letting us choose formatted or raw would make that much easier in lots of use cases.