Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
i have date-time data coming in from sql server in the form of integar
ex: one column 'abc' contains values such as : 1002171551 (date value in: yymmddhhmm)
2nd column 'def' contains values such as : 100217 or 1002170000 (date value in: yymmdd)
now i need to calculate difference between these two columns and i want sql server to treat these as date columns and not integar ones.
right now when i do the difference i get result purely as in subtraction of 2 integar values. but i want the result to be calculated as a difference between dates.s
any suggestions?
Hi,
Based on your example, I loaded it inline, used the makedate function to get the proper date format. Now you can compute for the date difference. See the attached file for your reference.
Regards,
Janzen