Date fields validation - InfoPath Dev Sign in | Join | Help in Newbie Questions 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 » Newbie Questions » Date fields validation Date fields validation Last post 04-10-2012 10:50 PM by Jimmy. 4 replies. Page 1 of 1 (5 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 10-26-2010 05:47 AM SWAM Joined on 10-26-2010 Posts 3 Date fields validation Reply Contact Hello there, I have created a form, which havetwo date fields. I want to make sure that Staring date is always less than End date. Any one have a smart idea, as i am new to InfoPath. Thanks. 10-26-2010 08:00 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Date fields validation Mark as Not AnswerMark as Answer... Reply Contact Hi -- you can add validation to both the Start and the End date fields. Right click on the field in the data source task pane and select properties. Under the Validation tab (if you are using IP 2010, I think this may be under rules, so you'll need to click the Manage Rules button for the field instead of the properties) you can add validation rules. For end date, for example, the rule would have the conditions Start is not blank and Start is not less than End. You can enter the error message you'll show the user, and even pop up an error message! Hilary Stoupa 10-27-2010 02:04 AM In reply to SWAM Joined on 10-26-2010 Posts 3 Re: Date fields validation Mark as Not AnswerMark as Answer... Reply Contact Thanks Hilary for your hints. Now it works the way i want. Take Care 04-10-2012 05:57 PM In reply to Voicenat Joined on 11-29-2011 Posts 2 Re: Date fields validation Mark as Not AnswerMark as Answer... Reply Contact Hi Hilary I am trying to use a similar validation were the date can not be "less than" the date the form was created. Which works fine if it is not equal to the date the form was created. When this scenario occurs I recieve the validation msg I want the user to be able to use a date that is equal to. do you have any tips on a work around. 04-10-2012 10:50 PM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: Date fields validation Mark as Not AnswerMark as Answer... Reply Contact How about something like this:translate(substring(firstDate, 1, 10), '-', '') > translate(substring(secondDate, 1, 10), '-', '') Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software Page 1 of 1 (5 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Hello there,
I have created a form, which havetwo date fields. I want to make sure that Staring date is always less than End date. Any one have a smart idea, as i am new to InfoPath.
Thanks.
Thanks Hilary for your hints. Now it works the way i want.
Take Care
Hi Hilary
I am trying to use a similar validation were the date can not be "less than" the date the form was created. Which works fine if it is not equal to the date the form was created. When this scenario occurs I recieve the validation msg I want the user to be able to use a date that is equal to. do you have any tips on a work around.
How about something like this:
translate(substring(firstDate, 1, 10), '-', '') > translate(substring(secondDate, 1, 10), '-', '')