This is the MS SQL list, not Oracle. Your suggestion below seems to be
for Oracle - MS SQL doesn't have that function!
Second, Biswaranjan needs to understand how the BOL is written, the [
and ] can be omitted. I'm sure that if you do that, your statement will
work.
--- Srividhya Balasubramaniam
<mssqldba-ezmlmshield-x64021089.[Email address protected] wrote:
> 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.
MS Sql Server LazyDBA home page