Hello,

Is there a better way to convert separate integer values, representing Day, Month, Year, Hour, Minute and Second to DateTime?

I work in the Automation Industry and PLC (Programmable Logic Circuits) programs often store Date/Time in this format.

The best I can work out is like this...

Declare @Day Int
Declare @Month Int
Declare @Year Int

Set @Day = 1...