# System.WorkDate([Date]) Method
> Version: _Available or changed with runtime version 1.0._
Gets and sets the work date for the current session.
## Syntax
```al
[WorkDate := ]  System.WorkDate([NewDate: Date])
```
> NOTE
> This method can be invoked without specifying the data type name.
## Parameters
*[Optional] NewDate*
Type: ../date/date-data-type
The new work date you want to set.
## Return Value
*[Optional] WorkDate*
Type: ../date/date-data-type
## Remarks
To set the work date to follow the calendar day so that the work date is always the current date, set NewDate to Today or `0D`. If you explicitly set NewDate to the current date, then the work date will also follow the calendar day.
## Example
This example shows how to use the WorkDate method.
```al
var
    NewDate: Date;
    Text000: Label 'The new work date is: %1';
begin
    NewDate := WorkDate(20180101D);
    Message(Text000, NewDate);
end;
```
The code sets the work date to January 1, 2018, and returns the new date in a message. On a computer that has the regional format set to English \(United States\), the message window displays the following:
The work date is: 01/01/18
## Related information
system-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/system/system-workdate-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/system/system-workdate-method/
