Hello
I have a query which performs a FOR XML AUTO, ELEMENTS against my table
In my table there are some datetime fields
The resulting xml has these fields formatted as yyyy-mm-ddThh:mm:ss
(2005-03-15T15:30:00)
Is there a way to get this fields in a different format? I need dd/mm/yyyy
hh:mm:ss
ThanksTry playing around with the style parameter of CONVERT function to format
the date into a desired format.
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Denis" <dzoddi@.mvmnet.com> wrote in message
news:eNCjs$kKFHA.4092@.tk2msftngp13.phx.gbl...
> Hello
> I have a query which performs a FOR XML AUTO, ELEMENTS against my table
> In my table there are some datetime fields
> The resulting xml has these fields formatted as yyyy-mm-ddThh:mm:ss
> (2005-03-15T15:30:00)
> Is there a way to get this fields in a different format? I need dd/mm/yyyy
> hh:mm:ss
> Thanks
>
>|||Hi Denis
This is the ISO8601format for the date and therefore it is "safe", you
should look at transforming it on the client rather than in the XML.
John
"Denis" wrote:
> Hello
> I have a query which performs a FOR XML AUTO, ELEMENTS against my table
> In my table there are some datetime fields
> The resulting xml has these fields formatted as yyyy-mm-ddThh:mm:ss
> (2005-03-15T15:30:00)
> Is there a way to get this fields in a different format? I need dd/mm/yyyy
> hh:mm:ss
> Thanks
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment