LIYA (10/6/2010)
insert into DateFormatselect '2010-06-18 07:33:17' union all
select '2010-06-18 07:40:18' union all
select '2010-06-18 18:40:10' union all
select '2010-06-18 14:45:17' union all
i need the result as follows
Wdate
18/06/2010 07:33:17 AM
18/06/2010 07:40:18 AM
18/06/2010 06:40:10 AM
18/06/2010 02:45:17 AM
Can you confirm that you do actually want the last two rows to display "AM" and not "PM"?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden