Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy to XLS & dates
Message
De
06/01/2001 11:00:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/01/2001 07:23:50
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00459337
Message ID:
00460207
Vues:
25
Peter,
You could also use formula :
datevalue(date_text_cell)
A numeric value would return (Excel stores dates as date-{1/1/1900}). Just format the column as date.
Cetin

>Thanks,
>I added a column and used the following formula:
>=IF(MID(H2,1,2)<>" ", DATE(MID(H2,8,2),HLOOKUP(MID(H2,4,3), $P$2:$AA$3,2,FALSE),MID(H2,1,2)),"")
>
>
>with a JanFeb etc to 1 2 horizontal lookup in P2:AA3
>works like a charm
>
>
>Peter
>
>>In Excel you can write & run a macro. Here cells in column A having rows from 2 to 10 should appear in a new format:
>>
>>
>>Sub Macro1()
>> For Each c In Range("A2:A20")
>> c.NumberFormat = "mm/dd/yy"
>> c.FormulaR1C1 = c.Value
>> Next c
>>
>>End Sub
>>
>>
>>Best Wishes
>>
>>>>>>>>>>>>>>>>>>previous messages below
>>Thanks but what can i do in excel. the data ARE already there. And the dates look like "24-Mar-00"
>>Id there a At function alike in excel so I could somthing like =date((mid(f2,1,2),AT(mid(f2,4,3),"JanFebMar...")/3......
>>to convert into a data for sorting???
>>
>>Peter
>>
>>
>>
>>>>When I do a copy to mySpredsheet type XLS in FP2.5 dates come into Excel as character
>>>>When a user sorts on a date he gets all januaries all februaries etc.
>>>>
>>>>How can that be done right so the user can actually sort on a date column???
>>>>
>>>>Thanks
>>>>
>>>>Peter
>>>
>>>When you do COPY TO, make it TYPE XL5. That gives you a more advanced format. (XLS is Excel 2; XL5 is, naturally, Excel 5.)
>>>
>>>Tamar
>>Peter Cortiel
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform