Sorry lately I realized that it is mssql discussion. Mine was an oracle
version.
Warm regards
Srividhya
-----Original Message-----
From: Srividhya Balasubramaniam
[mailto:mssqldba-ezmlmshield-x64021089.[Email address protected]
Sent: Thursday, July 29, 2004 11:02 AM
To: LazyDBA Discussion
Subject: RE: Date formatting using convert
You can try the following:
SQL> select to_char(sysdate, 'MM-DD-YYYY') from dual;
TO_CHAR(SY
----------
07-29-2004
I hope this helps :-)
Warm Regards
Srividhya
-----Original Message-----
From: Biswaranjan Rath
[mailto:mssqldba-ezmlmshield-x80381579.[Email address protected]
Sent: Thursday, July 29, 2004 10:55 AM
To: LazyDBA Discussion
Subject: Date formatting using convert
Syntax of Conevrt is
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )
I'm trying as
select convert(datetime [ 8 ], '2004-07-28 12:53:29.957', 110)
but it's not working. even i tried
select convert(datetime [ 'mm-dd-yyyy' ], '2004-07-28 12:53:29.957',
110)
i want the date in mm-dd-yyyy format. so can anyone suggest me...
With best regards
Biswaranjan Rath
Subject Matter Expert
Amdocs DVCI, Pune, India
Phone : +91-20-4048951 Extn.: 302(Office)
+91-20-4062302 (Direct)
------------------------------------------------------------------------
-------------
The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated
recipient(s)
of the message. If the reader of this message is not the intended
recipient,
you are hereby notified that any dissemination, use, distribution or
copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us
immediately
by replying to the message and deleting it from your computer.
Thank you.
---------------------------------------------------------
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]
MS Sql Server LazyDBA home page