Locate by date

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
kend
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 04.09.2008, 18:07

Locate by date

Post by kend »

I'm in the process of converting from Access using dbGo to MySQL using Zeos. These lines:

if locate('Date', datetostr(date), []) then
Edit
else
Append;

worked with Access to edit a record if it exists with todays date or add a record if not but it doesn't work with MySQL. Could someone let me know what might be wrong? I assume it's a date format problem or some such?

Many thanks,

Ken
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

If i type

Query.Locate('c_date_came',EncodeDateTime(2002,12,19,14,0,0,0),[])

It works to me
kend
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 04.09.2008, 18:07

Post by kend »

You're a gentleman and a scholar, works perferctly.
Post Reply