Jump to content

[SOLVED] non-standard date format comparison - help


AndyB

Recommended Posts

I managed to force ISO standard date formats for user entries in a database, but forgot that the client can also enter dates.  Unsurprisingly, the Australian client has entered dates (in a different field) in the Oz-style dd/mm/yyyy.

 

I need a query that effectively chooses records where Oz-style date is between two ISO-style dates:

 

SELECT ... WHERE iso_date1>Oz_date and iso_date2<Oz_date ORDER by Oz_date

 

Nothing is jumping out of the ref manual that seems to apply.  I'm sure it's blindingly obvious, but not to me.

Link to comment
Share on other sites

Thanks, Barry.  After the query failed miserably during localhost testing, I decided to move it to the client's server and it worked. The production server control panel declines to reveal what MySQL release is running.

Link to comment
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.