From: Martin Gainty Date: May 22 2009 2:15pm Subject: RE: Date Time List-Archive: http://lists.mysql.com/mysql/217647 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_f54212f3-3655-4408-a37f-e0e4031c3037_" --_f54212f3-3655-4408-a37f-e0e4031c3037_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable mysql> create table t(d datetime)=3B Query OK=2C 0 rows affected (0.08 sec) mysql> insert into t(d) values(str_to_date('Thu May 21 03:15:28 +0000 2009'= =2C '%a %b %e %H:%i:%s +0000 %Y'))=3B Query OK=2C 1 row affected (0.00 sec) mysql> select * from t=3B +---------------------+ | d | +---------------------+ | 2009-05-21 03:15:28 | +---------------------+ most of us have contacts in europe who dont use EDT=2CCDT=2CMDT or PDT so=20 i *was hoping* to get confirmation on CONVERT_TZ(date=2Cfrom_tz=2Cto_tz) wo= rks? Thanks=2C Martin Gainty=20 ______________________________________________=20 Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 =20 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . > Date: Fri=2C 22 May 2009 07:14:58 -0600 > From: john.l.meyer@stripped > To: janek.bogucki@stripped > CC: mysql@stripped > Subject: Re: Date Time >=20 > Janek Bogucki wrote: > > Hi John=2C > > > > http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html include= s > > some information about acceptable literal forms for dates and times. > > > > 'Thu May 21 03:15:28 +0000 2009' is not an acceptable literal form but > > this is how to parse it APART from the time zone component. I could not > > see from the documentation how to specify the time zone component so th= e > > format below IGNORES the time zone. > > > > mysql> create table t(d datetime)=3B > > > > mysql> insert into t(d) values(str_to_date('Thu May 21 03:15:28 +0000 2= 009'=2C '%a %b %e %H:%i:%s +0000 %Y'))=3B > > > > =20 > Thanks. That'll work. >=20 > --=20 > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dmgainty@stripped= om >=20 _________________________________________________________________ Hotmail=AE has ever-growing storage! Don=92t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=3DTXT_TAGLM_WL_HM_Tuto= rial_Storage1_052009= --_f54212f3-3655-4408-a37f-e0e4031c3037_--