DateTime Field acting weird for Date 20th

Jan 21, 2010 at 10:27 AM
Edited Jan 21, 2010 at 10:29 AM


I think I found a weird kind of bug [or it can well be me]. The auto population works fine for all the fields including datetime for every date except 20th which is really weird which highlighted by one of the users yesterday! as yesterday was 20th. I have tried everything to figure out what's wrong but I am stumped, one of the reason I can think of is because the script might be getting confusing with all the "20"s in the query string. The date selected is something like

20/01/2010 11:00 am

the spaces in between becomes 20/01/2010%2011:00%20am in the query string. This adds value in the DateTime Field as follows:

[20/01/2010 11:00 am] in date field. which is wrong it should be

[20/01/2010] in date field. This works perfect for any other dates, but not for 20th!

I am really stumped.

Any  help will be much appriciated.

Thanks &Regards,


Jan 21, 2010 at 1:33 PM

This script was written for the standard US date format MM/DD/YYYY.  The regex expressions at the top for date and datetime need to be adjusted for another format.  ([1-9]|0[1-9]|1[012]) accepts 1 through 9 OR 0 and a 1 through 9 OR 1 with 0, 1, or 2.  Swap that with ([1-9]|0[1-9]|[12][0-9]|3[01]) and you should be in business.

Jan 22, 2010 at 4:07 PM

worked like a charm!


Thanks [AutoSponge]. surely  not your real name. let me know your real name , so thatI can thank you properly.