Skip to main content

Changing the defaul of the date stored in COBOL from MMDDYY to DDMMYY?

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

Changing the date format stored in COBOL register from MMDDYY to DDMMYY.

Resolution:

The compiler directive CURRENT-DATE specifies the format stored in the CURRENT-DATE special register.  The syntax is

CURRENT-DATE "date-format"

"date-format" is either DDMMYY  or MMDDYY

Setting CURRENT-DATE to DDMMYY  causes CURRENT-DATE to be stored in European format. The parameter can be specified in either upper case or lower case.

Old KB# 2003