Search…
check_dateformat
This Subroutine checks if a date is in the YYYYMMDD format, if not then it raises and error.

Syntax

1
gosub check_dateformat ("YYYYMMDD")
Copied!

Code Snippet

1
subroutine check_dateformat {
2
match date "^(([0-9]{4}(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])))" ${SUBARG_1}
3
if (${date.STATUS} != MATCH) {
4
print Argument error: ${SUBARG_1} is not in YYYYMMDD format
5
terminate with error
6
}
7
}
Copied!
Last modified 5mo ago
Export as PDF
Copy link