Using Dates with the INPUT Command

The INPUT command also supports dates. You can load a date into a date or string variable. For string variables, use the TYPE=DATE qualifier. Specify a format for the date. Here is a code example:

input $start_date 'Enter starting date'  type=date  format='dd/mm/yyyy'

In this example, the user is prompted with Enter starting date: (the colon is automatically added). The user then enters the value, which is validated as a date by using the dd/mm/yyyy format. The value is loaded into the $start_date variable.