GetDate
What is it?
The GetDate function returns the current system date as a string value. It requires no arguments.
What is the Syntax?
The GetDate function’s syntax is as follows:
GetDate();
Why might I want to use this?
The operator of a website that offers insurance quotes wants to send an e-mail to the customer confirming the quote request, and another one to the vendor responsible for assessing their details and providing appropriate quote information. Furthermore, the quote request is stored in a database and a target date for turnaround is five days after the original request is required.
All of these actions require the date of the original request to be stored for later reference. To do this, you would assign the date at the time of the request to a variable, as shown below:
DateOfRequest := GetDate();
The format of the returned string is dd/MM/yyyy. An example of a value returned from GetDate() is “17/07/2019”.
<< Previous: Date String Formatting | Next: Date Difference (DateDiff) >>