Re: DBTIME and time date types
Posted in 1998
This is a multipart message in MIME format --------------InterScan_NT_MIME_Boundary Content-Type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable With ESQL 7=2E23=2EUC1, (and possibly earlier versions), you can do =20 dttofmtasc(&dtval, outstr, sizeof(outstr), "%a %b %e %H:%M:%S %Y"); =20 which will give you exactly what you want, but without the timezone=2E= =20 The timezone is difficult because you have no way of knowing if a=20 particular date is in daylight saving time (if you have that where you= =20 are)=2E You could get the TZ variable from Unix, however, and use tha= t=2E =20 HTH Davin ______________________________ Reply Separator ____________________________= _____ Subject: DBTIME and time date types Author: PC {apatnaik@aircom=2Ecom} at INTERNET Date: 30/06/1998 21:44 hello, =20 I am being passed in a character string which contains a=20 date/time in the following format: YYYY-MM-DD HH:MM:SS =20 ex: 1998-05-18 09:05:00 =20 =20 I need to convert it such that it looks like the below: Mon May 18 09:05:00 EDT 1998 <-- output like that of unix time() =20 =20 I would like to know if there is an easy way to do the=20 above=2E I am able to obtain the above format except for the day of the week and the time zone by making=20 calls to dtcvasc() to convert to a datetime, and then=20 using dttofmtasc() with formatting=2E Is there a general=20 utility either in Informix or in C that can allow me to=20 print the day of the week?? =20 Thanks, apatnaik@aircom=2Ecom =20 -----=3D=3D Posted via Deja News, The Leader in Internet Discussion =3D=3D-= ----=20 http://www=2Edejanews=2Ecom/rg_mkgrp=2Exp Create Your Own Free Member For= um =20 ********************************************************************** DST International Tel:+44 181 390 5000 www=2Edstinternational=2Ecom=20 This message and any attachments to it is intended only for the=20 individual or company to which it is addressed and may contain=20 information which is privileged, confidential or prohibited from=20 disclosure or unauthorised use=2E If the recipient of this=20 transmission is not the intended recipient, or the employee or agent=20 responsible for delivering such materials to the intended recipient,=20 you are hereby notified that any use, any form of reproduction,=20 dissemination, copying, disclosure, modification, distribution and/or=20 publication of this e-mail message or its attachments other than by=20 its intended recipient is strictly prohibited by the sender=2E =20 If you have received it in error, please notify us immediately by=20 telephone on the number above and destroy the message and all copies=20 in your possession=2E ********************************************************************** --------------InterScan_NT_MIME_Boundary--