Function 2Ah Get Date

mov ah, 2Ah ;Get Date

int 21h

mov WeekDay, al ;day of week (0 = Sunday, 1 = Monday, etc.)

mov Year, cx ;year (1980 through 2099)

mov Month, dh ;month (1 = Jan, 2 = Feb, etc.)

mov MonthDay, dl ;day of month (1 through 31)

Get Date (Function 2Ah) returns the current MS-DOS system date (the date maintained by the clock device).

Parameters

This function has no parameters.

Return Values

The AL, CX, and DX registers contain the following information:

Register Contents

AL A number representing the day of the week (0 = Sunday, 1 = Monday, and so on)
CX A year number (1980 through 2099)
DH A number representing the month (1 = January, 2 = February, and so on)
DL The day of the month (1 through 31)

See Also

Function 2Bh Set Date
Function 2Ch Get Time
Function 2Dh Set Time