RE: [U2] Convert to date and Time
When i feed an excel sheet with data from UniVerse via a perl script i use the well known format : $worksheet-write_date_time('A1', '2004-05-13T23:20', $date_format); i use this routine in my basic program : ** CONVERT.DATO: ** * * Convert date to a format understood in date formatted columns in EXCEL * after the 'T' you can apply the time in HH:MM notation * * input : I.DATO : i.e. : 14192 *: I.TIME : i.e. : 34567.334 * output : O.DATO : i.e. : 2006-11-08T O.DATO = OCONV(I.DATO,'D4-YMD'):'T' * with time added * O.DATO = OCONV(I.DATO,'D4-YMD'):'T':OCONV(I.TIME,'MTS') RETURN In your case the line would be : O.DATO = OCONV(FIELD(Date_Time_Qty,'*',1),'D4-YMD'):'T':OCONV(FIELD(Date_Time_Qty,'*',2),'MTS') Best regards from denmark Claus Derlien programmxr Edb-afdelingen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 3:53 PM To: [EMAIL PROTECTED] Subject: [U2] Convert to date and Time I need to convert a Multivalue field to Date and Time format in MS Excel. The Mutivalue filed has the following description and the value next to that. Date_Time_Qty: 14121*31190.858 Any suggestion is appreciated. Thanks. Krish --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Convert to date and Time
Krish, Why don't you just transfer the data to MS Excel already converted? Example. DT=OCONV(FIELD(DATE_Time_Qty,'*',1),'D4/') TM1=FIELD(DATE_Time_Qty,'*',2) TM=OCONV(FIELD(TM1,'.',1),'MT') You can create a dict or eval item. Hope it helps. Cheers, Angelo From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 9:53 AM To: [EMAIL PROTECTED] Subject: [U2] Convert to date and Time I need to convert a Multivalue field to Date and Time format in MS Excel. The Mutivalue filed has the following description and the value next to that. Date_Time_Qty: 14121*31190.858 Any suggestion is appreciated. Thanks. Krish --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Convert to date and Time
The number before the asterisk is the date stored as the number of days since 12/31/1967 (so day 14121 = 08/29/2006). The remaining number is the number of seconds (and thousandths of seconds) since midnight. In this case 08:39:50am [EMAIL PROTECTED] wrote: I need to convert a Multivalue field to Date and Time format in MS Excel. The Mutivalue filed has the following description and the value next to that. Date_Time_Qty: 14121*31190.858 Any suggestion is appreciated. Thanks. Krish --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ -- == Jeff Schasny jschasnyATricochetDOTcom == --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Convert to date and Time
Do you mean something like this: SUBR(-FIELDS, Mv_Dict, , 2); SUBR(-FIELDS, @1, *, 1); SUBR(-FIELDS, @1, *, 2); SUBR(-FIELDS, @, ., 1); OCONVS(@2, D2/); OCONVS(@4, MTH); SPLICE(@5, , @6) Thanks, David A. Green DAG Consulting -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 6:53 AM To: [EMAIL PROTECTED] Subject: [U2] Convert to date and Time I need to convert a Multivalue field to Date and Time format in MS Excel. The Mutivalue filed has the following description and the value next to that. Date_Time_Qty: 14121*31190.858 Any suggestion is appreciated. Thanks. Krish --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Convert to date and Time
Krish I found this old post on comp.databases.pick http://groups.google.com/group/comp.databases.pick/browse_thread/thread/ 2808b1db159fc2e6/a5df053ce372b7e5?lnk=gstq=internal+data+excelrnum=1#a 5df053ce372b7e5 Salient excerpt: The base date for Excel for Windows is January 1, 1900 and for Excel on the Mac it is January 1, 1904. (Don't ask me why there is a difference. It's 'cause Bill said so.) So, the conversion factors are 24,837 and 23,375 respectively. So to convert from Excel to Pick internal date you would subtract that factor from the Excel date. To convert from Pick to Excel, simply add the factor to the value in question. R. Baker Hughes UniVerse Programming Mouser Electronics, Inc. (817) 804-3598 * [EMAIL PROTECTED] * -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 8:53 AM To: [EMAIL PROTECTED] Subject: [U2] Convert to date and Time I need to convert a Multivalue field to Date and Time format in MS Excel. The Mutivalue filed has the following description and the value next to that. Date_Time_Qty: 14121*31190.858 Any suggestion is appreciated. Thanks. Krish --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/