Jump to content

Recommended Posts

ORDER BY copyrightDate

 

I think that should do the trick on it's own. If not try adding DESC or ASC after copyrightDate and see if that gets you what you are after.

 

btw, that is a really bad format to store the time in. Timestamp is way more flexible and preferred =)

Link to comment
https://forums.phpfreaks.com/topic/137586-order-by-date/#findComment-719132
Share on other sites

ORDER BY copyrightDate

 

I think that should do the trick on it's own. If not try adding DESC or ASC after copyrightDate and see if that gets you what you are after.

 

btw, that is a really bad format to store the time in. Timestamp is way more flexible and preferred =)

 

ok thanks.  I'll change it to timestamp.  When I change, will it still be the same, ORDER BY copyrightDate?

Link to comment
https://forums.phpfreaks.com/topic/137586-order-by-date/#findComment-719145
Share on other sites

ORDER BY copyrightDate

 

I think that should do the trick on it's own. If not try adding DESC or ASC after copyrightDate and see if that gets you what you are after.

 

btw, that is a really bad format to store the time in. Timestamp is way more flexible and preferred =)

 

ok thanks.  I'll change it to timestamp.  When I change, will it still be the same, ORDER BY copyrightDate?

 

Probably need the DESC after it like Maq mentioned.

Link to comment
https://forums.phpfreaks.com/topic/137586-order-by-date/#findComment-719149
Share on other sites

Yeah I think ASC is default if you don't specify.  And since you want most recent, you want descending because that will list greatest to least, so to speak.

 

It's fairly easy to convert timestamps to formatted dates.  PHP handles this feature very well.

Link to comment
https://forums.phpfreaks.com/topic/137586-order-by-date/#findComment-719153
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.