Getdate

getdate

Description:
Function getdate get the current server date, which will be stored in the variables &year, &month and &day.
This function name starts with a lowercase letter.


Parameters:
(&year = 0, &month = 0, &day = 0)
int year The variable to store the year in, passed by reference.
int month The variable to store the month in, passed by reference.
int day The variable to store the day in, passed by reference.


Return Values:
The number of days since the start of the year.


Examples:
new Year, Month, Day, Days;
Days = getdate(Year, Month, Day);
printf("%02d/%02d/%d", Day, Month, Year);
printf("Days since the start of the year: %d", Days);


Related Functions
The following functions may be useful, as they are related to this function in one way or another.
  • gettime: Get the current time of the server as a unix timestamp.
  • tickcount: Replacement for GetTickCount.