I have an nvarchar column that in essence stores the following data: The first two numbers represent the year created and the last numbers represent the id of the unit made that year. Whenever I sort I get the 99’s first and 19 last. I’d like to sort by latest year first and then numerically. I have tried converting to
Tag: sql-convert
Convert time float to format HH:mm sql server
I need to format a float decimal number into a time format hour:minute. I wrote this Scalar-Value Functions with an input float and output varchar(6): It looks like great, but not for everything records. This is my output: As you can see from the results, there are 3 wrongs conversion: 0.33 = 00:19 // 0.58 = 00:34 // 0.83 =