• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: date comparison in EOModeler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: date comparison in EOModeler
      • From: "Arturo Perez" <email@hidden>
References: 
 >date comparison in EOModeler (From: Goh Keng Boon <email@hidden>)

  • Prev by Date: EOModels and Eclipse Question
  • Next by Date: Re: EOModels and Eclipse Question
  • Previous by thread: date comparison in EOModeler
  • Next by thread: Re: date comparison in EOModeler
  • Index(es):
    • Date
    • Thread