I want to display date time as eg. Dec 1, 09 11:22:45 PM using SQL query
Currently my format is :
DATENAME(Month, (((MachineGroups.TimeAdded*10000000)+ 621355968000000000) -599266080000000000) / 864000000000) + SPACE(1) + DATENAME(d, (((MachineGroups.TimeAdded*10000000)+ 621355968000000000) - 599266080000000000) / 864000000000) +', ' + DATENAME(year, (((MachineGroups.TimeAdded*10000000)+621355968000000000) - 599266080000000000) /864000000000) + SPACE(1)+DATENAME (hour,(((MachineGroups.TimeAdded*10000000)+621355968000000000) - 599266080000000000) / 864000000000) + ':' +DATENAME (minute,(((MachineGroups.TimeAdded*10000000)+ 621355968000000000) - 599266080000000000) / 864000000000) + ':' +DATENAME (second,(((MachineGroups.TimeAdded*10000000)+ 621355968000000000) - 599266080000000000) / 864000000000) AS Expr2
Ussing the above i get eg. December 1, 2009 23:22:45
I tries using the cuatom formata of "MMM" and "yy" but it did not work
any suggestions??? thanks
Is there no way i can use the Datename property above to get my desired format??