Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Importing from Excel-strange results
Message
From
11/03/2004 10:41:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/03/2004 14:34:14
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00884946
Message ID:
00885233
Views:
14
>I am importing data from an Excel spreadsheet
> Import From (m.xlsfile) Type Xl8 Sheet "new order file"
>Which creates a new .dbf with fields "a", "b", "c", etc.
>In the original spreadsheet is a field whose contents represent a time...
> 9:00:00 PM
>...however, once it's imported it looks like this...
> 12/30/99 09:0
>...then further down in my code I use the value scattered from the new .dbf and attach this information to some text (field name=P)...
> comment3="Hard Start Time: "+Alltrim(M.p)+'. '
>...and the value of comment3 becomes
> Hard Start Time: 9:00:00 AM.
>I have no idea where the AM part is coming from. Can anyone explain to me what's happening here and/or just how to get it to reflect AM/PM correctly?
>
>Thanks,
>Martha

Format the column as text. Otherwise it's internally a numeric value for Excel (0.875). I don't know how import would interpret it as I never use import command.
Cetin
Ç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
Previous
Reply
Map
View

Click here to load this message in the networking platform