Solved

Best approach to handle a date-time-short domain in a look-up column

  • 13 February 2023
  • 1 reply
  • 53 views

Badge

Hey there,

I have recently encountered an error - which might seem like a bug - about a look-up column. 

In this case we have a sounding date which I would like to attach to a report. Therefore I would like to see the most recent time up until the seconds, which was also confirmed, by a third party. 

So the column itself has a control type - date, but in the GUI this will be set to varchar, which ends up like this

This is not the most charming. So I came up with a 2nd option, by adding a new column to this specific table with a varchar domain. 

Is there maybe a better approach not having the date-time-short domain converted to varchar?

icon

Best answer by Freddy 13 February 2023, 19:26

View original

This topic has been closed for comments

1 reply

Userlevel 5
Badge +16

In SQL server 2022 you’ll have datetrunc() available to truncate to a minute. I now use a custom function that uses dateparts to create new datetime up to minutes.