number_to_date()

Purpose

Converts a number to a date

Old name

#define number_2_date number_to_date

Syntax

datetype* number_to_date(number)

Parameters

long number

Number of days since 01 March 1980

Description

The number_to_date() function returns the date corresponding to the number of days given since 01 March 1980 which was a Saturday and counts as zero.

It works on dates from 01 March 1600 to 31 December 9999, and uses the Gregorian calendar. It does not take account of changes from the Julian calendar which took place in English speaking countries in 1752.

Return values

Returns pointer to calculated date

See also

date_to_number(), date_add_number()

Example

app_start_date = *number_to_date(20000);