Date calculations in InfoPath

Learn the basics of using date fields in InfoPath and progress onto using rules and formulas or code to perform date calculations in InfoPath.

InfoPath date basics

Date and time basics in Microsoft Office InfoPath

Understand how Microsoft Office InfoPath uses dates to be able to do your own date manipulations and calculations within InfoPath.

Extracting day, month, and year numbers from dates in InfoPath

Learn how to use the substring() and number() functions in InfoPath to extract the day, month, and year numbers from an InfoPath date string.

How to extract the month name from a date picker in InfoPath

Learn how to use a secondary data source, rules, filters, and InfoPath functions to extract the month name from the secondary data source based on the date that is displayed in a date picker control.

Date calculations without writing code

Calculating a person’s age given a date of birth using rules and formulas in InfoPath

Use rules, conditions, the today() function, the number() function, and the substring() function in InfoPath to calculate a person’s age from his/her date of birth.

Calculate the difference between two date picker controls in InfoPath using rules and formulas – no code!

Use rules, conditions, and the number(), floor(), and substring() functions in formulas to calculate the difference between two date picker controls in InfoPath.

Calculating date differences in InfoPath using SharePoint Excel Services

Use an Excel workbook published to Excel Services on a Microsoft Office SharePoint Server 2007 to calculate the difference between two dates in InfoPath without writing a single line of code.

How to check whether a start date falls before an end date in InfoPath

This article shows you how to use data validation rules in InfoPath to compare two dates and check whether one date falls before another.

Date calculations using code

Calculating date and time differences in InfoPath using VBScript

Use VBScript in InfoPath to calculate the difference between start and end dates and times, and sum the time differences to get a grand total amount of hours.

Calculating date differences in InfoPath using VBScript code

Use VBScript code to calculate the difference between two date pickers in InfoPath.

Calculating work days between two date pickers in InfoPath using VBScript

Use the DateDiff and Weekday functions in VBScript to perform date difference calculations in InfoPath that produce the amount of work days between two dates.

InfoPath date solutions

Auto-populate a repeating table in InfoPath with sequential dates

Learn how you can use a function and formulas in InfoPath 2007 to populate rows in a repeating table with sequential dates by entering one date and having the rest of dates automatically calculated and displayed.

Selecting the minimum date in an InfoPath repeating table using formulas (no code)

Learn how you can use a formula (no code) in InfoPath to find and highlight the rows in a repeating table that contain the date that falls before all other dates in one of the repeating table’s columns.

Working with InfoPath