STOD( ) function

Converts a serial date – that is, a date expressed as an integer – to a date value. Abbreviation for “Serial to Date”.


STOD(serial_date <,start_date>)



Numeric. The field, expression, or literal value to convert.

The serial_date parameter can accept a serial date or a serial datetime. Only the date portion of serial datetimes is considered. The time portion is ignored.


Optional. Datetime. The start date from which serial dates are calculated. If this parameter is omitted, the default start date of 01 January 1900 is used.


Datetime. The date value is output using the current ACL date display format.


The STOD( ) function allows you to convert serial dates to regular dates. ACL serial dates represent the number of days that have elapsed since 01 January 1900.

Serial date

Regular date equivalent


02 January 1900


31 December 1900


31 December 2014


not valid


ACL serial dates are similar to Microsoft Excel serial dates. You should be aware of one key point of similarity and one key point of difference. The two points are unrelated.

Both ACL and Excel treat the year 1900 as a leap year, with 366 days. Although 1900 was not in fact a leap year, Excel treated it as one in order to maintain compatibility with Lotus 1-2-3.

ACL serial dates are offset from Excel serial dates by one day. In Excel, 01 January 1900 has a serial date of ‘1’. In ACL, 01 January 1900 is not counted, and 02 January 1900 has a serial date of ‘1’.

If you have a source data file with serial dates that use a start date more recent than 01 January 1900, you can use the start_date parameter to match the start date in the source data. You cannot specify a start_date earlier than 01 January 1900. If you need to match a start date earlier than 01 January 1900, you can create a datetime expression that subtracts an appropriate number of days from the output results of the STOD( ) function.


Example Return value


31 Dec 2014

Assumes a current ACL date display format of DD MMM YYYY

STOD(42003, `19040101`)

31 Dec 2018

Assumes a current ACL date display format of DD MMM YYYY

STOD(42003) - 365

31 Dec 2013

Return values adjusted to match serial date data that uses a start date of 01 Jan 1899

Assumes a current ACL date display format of DD MMM YYYY


The equivalent date for each serial date value in the Invoice_date field

Related reference
STODT( ) function
STOT( ) function

(C) 2015 ACL Services Ltd. All Rights Reserved.