| Date: | Mon, 21 Apr 2008 10:50:42 +0200 |
| Reply-To: | "Keuss, C. (Caspar)" <caspar.keuss@REAAL.NL> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Keuss, C. (Caspar)" <caspar.keuss@REAAL.NL> |
| Subject: | Re: Data conversion in T SQL - Sybase HELP!!!! |
| In-Reply-To: | <1208494820.256702@reaal.nl> |
| Content-Type: | text/plain; charset="us-ascii" |
>How do you change a time format to military time in TSQL Sybase?
Military time format is the customary format for anyone outside
Australia, Canada and the US
[http://en.wikipedia.org/wiki/Military_time].
Converting formats in Transact SQL (used by Sybase and MS SQL Server),
where [style] defines the format. Style 8 returns hh:mm:ss military
style.
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )
MS has a list of T SQL styles and formats:
http://msdn2.microsoft.com/en-us/library/ms187928.aspx
>How do you change a datetime format for a field that is being
converted?
I don't know if I understand correctly. Wouldn't that be possible with
the statement above, with nested expressions if necessary - like below?
CONVERT(datetime, DATEADD(dd, 1 - DATEPART(cdw, HD_Call.Call_Date),
HD_Call.Call_Date), 112)
***************************************************************
Dit e-mailbericht is alleen bestemd voor de geadresseerden.
Indien dit bericht niet voor u is bedoeld, wordt u verzocht de
afzender hiervan op de hoogte te stellen door het bericht te
retourneren en de inhoud niet te gebruiken. Aan dit bericht
kunnen geen rechten worden ontleend. REAAL Verzekeringen N.V.
is statutair gevestigd te Utrecht en is ingeschreven in het
handelsregister van de Kamer van Koophandel onder dossiernummer
30099450.
***************************************************************
This e-mail message is intended to be exclusively for the
addressee. If you are not the intended recipient you are kindly
requested not to make any use whatsoever of the contents and to
notify the sender immediately by returning this e-mail message.
No rights can be derived from this message. REAAL Verzekeringen
N.V. is a public limited company, with corporate seat in
Utrecht, the Netherlands and trade register number 30099450.
***************************************************************
|