>>
>>If you're in the command window you can enter a valid date like:
>>
>>ldTestDate = CTOD("01/04/1995")
>>
>>then retrieve the date as:
>>
>>Select * from UserName where DOB = ldTestDate
>>
>>or
>>
>>Select * from UserName where DOB = CTOD("01/04/1995")
>>
>>This is using SQL select. It takes more commands, and a pprogram loop, to retrive via native VFP xBase code. Your query is too brief to determine what you want.
>
>
>ldTestDate = {01/04/1995}
Yes, Sergey, you've pointed out this before but whenever I use that construct I get the message:
"Ambiguous date/datetime constant. Use the format {^yyyy-mm-dd ..." (as your 2nd ex.)
or for some reason my date doesn't get stored as a date. I've never had any luck with that so I continue to use the old dBASE code that I trust, the way I learnt. I didn't want the same error messages to beset the newbie, Bilal.
>* Even better
>ldTestDate = {^1995/04/01}
Maybe so but I'm used to dates in British format (as I suspect Bilal is :-)
>
- 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.