Jump to content

Archived

This topic is now archived and is closed to further replies.

natalieG

date columns

Recommended Posts

we have a TABLE with column descrived as DATE1 DATE
if we store strings in this field as yyyy-mm-dd =2006-07-12
can this colum be used foir sorting as:
SELECT * FROM TABLE ORDER NY DATE1 DESC

Share this post


Link to post
Share on other sites
What happens when you try it?

Share this post


Link to post
Share on other sites
Yes you can. I would however recommend you to convert them to UNIX timestamps.

They have usually 10 digits and are easier to handle.

Share this post


Link to post
Share on other sites
@poirot

I was born in 1949 - try storing my date of birth in a UNIX timestamp.

Share this post


Link to post
Share on other sites
[!--quoteo(post=378029:date=May 29 2006, 02:29 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ May 29 2006, 02:29 AM) [snapback]378029[/snapback][/div][div class=\'quotemain\'][!--quotec--]
@poirot

I was born in 1949 - try storing my date of birth in a UNIX timestamp.
[/quote]
Yes, it's a problem. Wow, you're older than my father.
There are some code snippets for extended timestamps though. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.