Re: date comparison in EOModeler
Re: date comparison in EOModeler
- Subject: Re: date comparison in EOModeler
- From: Nathan Dumar <email@hidden>
- Date: Mon, 13 Dec 2004 10:38:41 -0500
As simply as I can explain it ...
Get the current date/time with a new NSTimestamp (for this example,
I'll call it rightNow). Obtain from this the number of hours, minutes,
and seconds (this will be for today only) (make sure you use 24-hour
time, not 12-hour time). Subtract these hours, minutes, and seconds
from rightNow, and you have the midnight of the beginning of today.
Now, when you do your database query, you want all the records whose
timestamp is > (greater than) the time you derived above, which is
midnight of the beginning of today.
If you need more help, let me know.
Take care,
Nathan
On Dec 13, 2004, at 5:33 AM, Goh Keng Boon wrote:
Hi All,
I've a field in my table which is defined as timestamp (postgres), and
i would like to extract out all the data where timestamp is today's
date,
what will be the most effective way?
thanks.
Regards,
KB
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden