General information
Category:
Coding, syntax & commands
Cut and paste the following code in prg and run the program and see the result.
********************************************************************
Clear
set cent on
Set Talk Off
?"BUG ?????"
?Set('Date')
?
lsErrMsg = " "
Set Date Amer
?"Date is set to American and trying to print {02/15/2000}"
lsErrMsg = " "
If Empty({02/15/2000})
lsErrMsg = " Why Blank ????"
EndIf
? " Date(American) :- "+DTOC({02/15/2000})+ lsErrMsg
?
Set Date Brit
?"Now the date is set to British and trying to print {15/02/2000}"
lsErrMsg = " "
If Empty({15/02/2000})
lsErrMsg = " Why Blank ????"
EndIf
? " Date(British) :- "+ DTOC({15/02/2000})+ lsErrMsg
?
? "AND ALSO CHANGE THE PC DATE TO 15/02/2000 OR GREATER THAN 12"
? "THIS ERROR WILL COME FOR DATE() FUNCTION ALSO"
return
*******************************************************************
You will find that one of the date is showing EMPTY.
1) Try SET DATE AMERICAN from command window, compile the prg and run.
You will find the British date is comming Empty.
2) Try SET DATE BRITISH from command window, compile the prg and run.
This will show you the American formate date as blank.
If you are using Date() Function, then also you will face the same prob. Write code for AMERICAN Date Type and compile file when Date is Set to BRITISH. Your whole program will give the wrong result. BE AWARE OF IT.
Is foxpro writes the Date format, while compiling, in FXP file????
Regards
Charmi Software Exports
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only