tag:blogger.com,1999:blog-4504860312480986243.post6134404463605981207..comments2023-12-19T13:46:10.863-05:00Comments on Out of the Box Solutions: InfoPath date calculations and date comparisons without codeBrendan Hornerhttp://www.blogger.com/profile/03976653245000784332noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-4504860312480986243.post-76373901827565242802012-12-06T16:09:53.710-05:002012-12-06T16:09:53.710-05:00When I've done this in the past (it's been...When I've done this in the past (it's been a while since this post), I would end up using addDays to add the rough number of days to be simple; otherwise you end up creating several rules to check for a valid entry and keep iterating to check for errors or else what you can do it always set it for the first of the month for however many months and then use the addDays formula to add the original day portion to the new day - 1. So, if your original date was the 31st, you could add 6 months but set the day to the 1st and then add 30 days to it (March 2nd or 3rd depending on leap year).Brendan Hornerhttps://www.blogger.com/profile/03976653245000784332noreply@blogger.comtag:blogger.com,1999:blog-4504860312480986243.post-61287210966433929562012-07-04T05:07:41.488-04:002012-07-04T05:07:41.488-04:00Hi, I'm trying to add 6 months to a given date...Hi, I'm trying to add 6 months to a given date. Do you have a workaround for dates such as 31st? If date is 31 August, plus six months would be February so 31st would be invalid.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4504860312480986243.post-20287494857137273122012-06-04T14:22:04.052-04:002012-06-04T14:22:04.052-04:00This means that the rule you are using isn't s...This means that the rule you are using isn't setting the date2 field correctly. The format for setting the date field HAS to be YYYY-MM-DD...so you might be setting the month or day incorrectly by not putting a zero in front for early months/days (e.g. 2012/06/04). What does your date2 field look like when you do the calculation (what's actually in the box)?Brendan Hornerhttps://www.blogger.com/profile/03976653245000784332noreply@blogger.comtag:blogger.com,1999:blog-4504860312480986243.post-62956813019208250342012-06-04T09:17:05.099-04:002012-06-04T09:17:05.099-04:00Hey Brendan, I've inserted all the rules, but ...Hey Brendan, I've inserted all the rules, but when I test out the form, my Date2 field has the red validation error box around it saying, "only date allowed." Any ideas here?Matthewhttps://www.blogger.com/profile/05309781880646200831noreply@blogger.comtag:blogger.com,1999:blog-4504860312480986243.post-54764753175686457482012-04-24T10:27:55.128-04:002012-04-24T10:27:55.128-04:00Could you please supply the XSN for this so i coul...Could you please supply the XSN for this so i could analyze it? momk.com@gmail.comjeremyhttps://www.blogger.com/profile/01817230603036646778noreply@blogger.com