Date validation less than or equal to today() not working - InfoPath Dev Sign in | Join | Help in InfoPath 2010 InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » InfoPath 2010 » Date validation less than or equal to today() not working Date validation less than or equal to today() not working Last post 09-04-2018 04:05 AM by thiyagu1990. 4 replies. Page 1 of 1 (5 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 09-15-2011 08:36 AM Deej2323 Joined on 09-15-2011 Posts 2 Date validation less than or equal to today() not working Reply Contact Hi all, I'm trying to apply a date validation of <= today() and it doesn't seem to be working because it's letting me enter today's date without giving me an error. I thought I could out-smart the validation rule by changing the validation to < today()+1 but then it won't let me put in today OR tomorrow. What am I missing? Thanks! Filed under: infopath 2010, Date picker 09-15-2011 08:43 AM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: Date validation less than or equal to today() not working Mark as Not AnswerMark as Answer... Reply Contact Try translate(date, '-:T', '') <= translate(today(), '-:T', '') Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software 09-15-2011 08:48 AM In reply to GSWAN Joined on 09-15-2011 Posts 2 Re: Date validation less than or equal to today() not working Mark as Not AnswerMark as Answer... Reply Contact Might also be worth trying to use now() instead of today, particularly if you are using both a date and time in the form. I had a similar issue recently where this resolved it. Grant 09-15-2011 09:08 AM In reply to Deej2323 Joined on 09-15-2011 Posts 2 Re: Date validation less than or equal to today() not working Mark as Not AnswerMark as Answer... Reply Contact Thanks for the input guys. Looks like now() is going to work! Jimmy, I didn't try your formula because now() was the easiest choice. I will keep this thread bookmarked just in case now() doesn't work at some point. Thanks again! DJ 09-04-2018 04:05 AM In reply to thiyagu1990 Joined on 08-14-2018 Posts 3 Re: Date validation less than or equal to today() not working Mark as Not AnswerMark as Answer... Reply Contact Thanks a lot GSWAN.. now() is working perfectly... :-) Page 1 of 1 (5 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Hi all,
I'm trying to apply a date validation of <= today() and it doesn't seem to be working because it's letting me enter today's date without giving me an error. I thought I could out-smart the validation rule by changing the validation to < today()+1 but then it won't let me put in today OR tomorrow.
What am I missing?
Thanks!
Try translate(date, '-:T', '') <= translate(today(), '-:T', '')
Might also be worth trying to use now() instead of today, particularly if you are using both a date and time in the form. I had a similar issue recently where this resolved it.
Grant
Thanks for the input guys. Looks like now() is going to work! Jimmy, I didn't try your formula because now() was the easiest choice. I will keep this thread bookmarked just in case now() doesn't work at some point.
Thanks again!
DJ