Date validation less than or equal to today() not working - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

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: Previous Next
  • 09-15-2011 08:36 AM

    Date validation less than or equal to today() not working

    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!

  • 09-15-2011 08:43 AM In reply to

    Re: Date validation less than or equal to today() not working

    Try translate(date, '-:T', '') <= translate(today(), '-:T', '')

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 09-15-2011 08:48 AM In reply to

    • GSWAN
    • Not Ranked
    • Joined on 09-15-2011
    • Posts 2

    Re: Date validation less than or equal to today() not working

    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

    Re: Date validation less than or equal to today() not working

    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

    Re: Date validation less than or equal to today() not working

    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.