Well, if you happen to be using Sql Server you can do that sort of thing in T-Sql. In Oracle, you can also accomplish the same thing using pl/sql. Either way i'd do it in a stored ...
Building on the DATETIMEFROMPARTS, DATETIME2FROMPARTS offers similar functionality, but yields more precise DateTime2 data type, containing fractions of a second to a specified precision. Naturally, ...