Using Sybase ASE 12.5.4 and I need to parse a datetime entry into a date and time column separately, separately. I am currently using the datename function to build a string for each column, as seen below:
(date is a datetime field)
datename(mm,cmt.date)+'/'+datename(dd,cmt.date)+'/'+datename(yy,cmt.date) as Date',
datename(hh,cmt.date)+':'+datename(mi,cmt.date)+':'+datename(ss,cmt.date) as 'Time',
Is there a cleaner and more efficient way of doing this?