DateFromParts Function (Access custom web app)

Office 2013 and later

Returns a date value for the specified year, month, and day.

Last modified: March 09, 2015

Applies to: Access 2013 | Access 2016

Note Note

The cloud storage feature described in this article is no longer supported in Office 2013 and Office 2016 and may result in the following error:

Sorry, we’re having server problems, so we can’t add <service> right now. Please try again later.

For cloud storage for Office Online, Office for iOS, and Office for Android, you can look into our Office Cloud Storage Partner Program.

DateFromParts(Year, Month, Day)

The DateFromParts function contains the following arguments.

Argument name



Integer expression specifying a year.


Integer expression specifying a month, from 1 to 12.


Integer expression specifying a day.

DateFromParts returns a date value with the date portion set to the specified year, month and day, and the time portion set to the default. If the arguments are not valid, then an error is raised. If required arguments are null, then NULL is returned.

The following expression uses the DateFromParts function to calculate the first day of the current month.