AnsweredAssumed Answered

FM13 (earlier?) SQL takes date format as 01/01/2013 (for example)

Question asked by JimBessette on Dec 14, 2013
Latest reply on Dec 16, 2013 by philmodjunk

Title

FM13 (earlier?) SQL takes date format as 01/01/2013 (for example)

Post

     I fought this evening with trying to write an SQL statement to compare a start and end date.  Everything I could find showed that the SQL should accept something like the following:

     SELECT * from SomeTable WHERE StartDate > '2013-12-31'

     This was not working for me.  I spent a lot of time trying to figure out what was wrong.  Even the FileMakerHacks "missing SQL manual" showed the date in that format.  Almost ready to post here, just for the heck of it, I tried this:

     SELECT * from SomeTable WHERE StartDate > '12-31-2012' AND StartDate < '01-01-2013'   

     To my surprise, it worked!  Then I got even more wild….   … > 12/31/2013 ….  01/01/2013.   It worked!

     Then, off the deep end…  12/31/14 ….   01/01/13.   Yes.  Amazed.  Had to share.  Everyone else who uses FM probably already knows this, but I couldn't' find it ANYWHERE.   Either I am horrible at searching, or it's so well known, that I'm the only one who didn't know.

     Jim

Outcomes