I am working with an AS400 database and SQLServer 2008. I would like a way to convert a date in say, MM-DD-YYYY into lilian format and back in T-SQL. Anyone know of any? Even if I convert the data that I had in the AS400 into SQLServer 2008 I believe I will still need the same function.
Share
I don’t think there’s a built in function. Could you just use the datediff function to convert to a lilian date format? Something like this:
and to get back you can use a dateadd() function in a similar way I would think.
You could make UDFs to wrap this functionality if you are going to need it in several places.