• 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: Strings and Timestamps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strings and Timestamps


  • Subject: Re: Strings and Timestamps
  • From: Drew Thoeni <email@hidden>
  • Date: Sun, 11 Jan 2004 22:06:46 -0500

It's best to make the timestamp a timestamp and not fight it.

If you do so the field will appear in WOBuilder and a "toString" is automatically available. But, you don't even need that to display the date (or time or time and date) in any format you want. Just drop the timestamp field onto an empty WOString in WOBuilder, select the dateformat you want in the inspector (you can construct your own if the list does not have what you want by just typing it in) and viola, you've got a a date.

Drew


On Jan 11, 2004, at 9:10 PM, Y.A.Espinoza wrote:

I've seen any number of questions about this topic, but since I can't figure it out on my own...

I've got a datetime column in my database. In my model, I internally call it a String and leave it datetime externally. The reason I do this is because I use a fetch spec to call up today's event: Date = "current_date". I don't know that the datetime equivalent of that is, so by calling the column a string, I can get around it and the fetch spec works.

Anyway, I want dates to appear as "Monday, Jan 1, 2004" rather than "2004-01-01." I know I can use a formatter to do this, but that only seems to work with a column that is a datetime. Now, I've seen examples with a Timestamp to a String, but it seems that what I'm looking for is to display a String as a Timestamp.

Or, is there just an easier way to call up the current date in a fetch spec rather than resorting to all of this?

Thanks for any and all suggs,

Ari
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Strings and Timestamps (From: "Y.A.Espinoza" <email@hidden>)

  • Prev by Date: Re: EOModeler and more
  • Next by Date: hello
  • Previous by thread: Strings and Timestamps
  • Next by thread: Re: Strings and Timestamps
  • Index(es):
    • Date
    • Thread