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
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
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.