main logo
Subject: Re: Date Problems
Author: Jeff Johnson
Posted: 2007/08/31 10:09:40
 
View Entire Thread
New Search


John Harvey wrote:
> You might try something like this:
>
> Lcdate=date()-30
>
> SELECT * FROM mytable WHERE thedate >?lcdate
>
> JH
>
>
> -----Original Message-----
> From: profox-bounces (AT) leafe .D.O.T com [mailto:profox-bounces@leafe.com] On Behalf
> Of Jeff Johnson
> Sent: Thursday, August 30, 2007 4:24 PM
> To: profox (AT) leafe .D.O.T com
> Subject: Date Problems
>
> I am using VFP9 and I do a SELECT * FROM mytable WHERE thedate >
> DATE(2007, 5, 1)
>
> and it selects the correct records, but changes the dates in the result
> cursor to garbage. I have been doing quite a bit with dates on this
> project and any time I use a WHERE clause or SET FILTER TO or IF thedate
> < ldsomedate, the dates get garbled. When I remove the filter or
> selection it gives me the same result set, but the dates in the result
> are correct.
>
> This is very puzzling to me.
>
> Jeff
>
> Jeff Johnson
> jeff@san-dc.com

John: It was a data problem not a VFP problem. I looked at the data in
the base table and it had good dates but when I ran the select it had
garbage. I did a select on a range of dates and got one record. So
there was one record and the rest of the records were all way into the
future. When scanning the base table, I didn't see the bad dates.

Thanks,

Jeff

--
Jeff Johnson
jeff (AT) san-dc .D.O.T com
SanDC, Inc.
623-582-0323
Fax 623-869-0675



 
©2007 Jeff Johnson
<-- Prior Message New Search Next Message -->