Display the current date
When designing a form, you can use a text box, rich text box, or date picker to display the date that the form was first created. You can also use an expression box to show the current date, although this value will be updated with the current date each time the form is opened.
Note You should use an expression box only if you do not want to use the current date in another calculation or save it as part of the form, because expression boxes only display data and do not store it.
- In design mode, double-click the control where you want to display the current date.
- On the Data tab in the Control Properties dialog box, click Insert Formula .
- In the Insert Formula dialog box, click Insert Function.
- In the Categories list in the Insert Function dialog box, click Date and Time.
- In the Functions list, click today, and then click OK twice.
- On the Data tab in the Control Properties dialog box, clear the Update this value when the result of the formula is recalculated check box.
If the date does not display correctly, follow these steps:
- Double-click the control.
- On the Data tab in the Control Properties dialog box, click Date (date) in the Data type box or Format as box, and then click Format.
- In the Date Format dialog box, click the format that you want.
Note The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed. Learn more