Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference in Date Save between VPP 7 & FPD
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01157275
Message ID:
01157279
Views:
22
Interesting naming convention <g> Your original table has date in character format. When you produce CSV can you change it to date (use CTOD, if you want)?



>Hi Chaps
>
>I've written a prog to work in FPD, to read in an XLS/CSV file and create a table (from a given copy struct).
>
>For ease of use I've been testing it in VFP and everything's hunky-dory. BUT the resultant table is not knowable from FPD26. So I've rebuilt the FPD proj and created a new EXE for it.
>
>When I run this, a date field that yields, say, 11/04/2006 in VFP, ends up with XX/XX/1920.
>
>I've got century on, date british
>
>
>Select IntermTable
>Locate
>Skip				&& 26/09/06 just to skip XLS/CSV header, col headings rec
>Scan Rest
>  Scatter MEMVAR
>  Select DestFB1
>  Append Blank
>  Replace Operator    with tnOperator, ;	
>  	 Journey	    with VAL( m.B), ;	
>  	 Route	    with PADL( ALLTRIM( m.C), 4, "0"), ;
>  	 Date	    with CTOD( m.E), ;
>  	 Class	    with PADL( ALLTRIM( m.D), 4, "0"), ;
>  	 TickTime    with ALLTRIM( m.F), ;
>  	 Number	    with VAL( m.G), ;
>  	 Fare	    with VAL( m.H), ;
>  	 Value	    with VAL( m.I), ;
>  	 OStage	    with PADL( ALLTRIM( m.J), 4, "0"), ;
>  	 DStage	    with PADL( ALLTRIM( m.K), 4, "0"), ;
>  	 Driver	    with VAL( m.L), ;
>  	 Bus	    with VAL( m.M), ;
>  	 Duty	    with VAL( m.N)
>EndScan
>
>
>
>IntermTable is that into which the XLS is initially imported.
>
>The s/s/ date is in the form: XX-XX-2006
>I've just realised that I haven't Set Mark to "-" - would that make any difference?
>
>Obviously, somewhere the s/w is treating the date as short (as with Cent off) but I can't figure out how/why.
>
>Any ideas?
>
>'ppreciate it
>
>Terry
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform