Y2K Millennium Compliance - University of Delaware


Year 2000 Example of Using a System Routine

C routine "getdate" takes a string containing date information and outputs values of day, month, and year. The format of the string is defined in a template file. In this example the template file, "timetemplate.txt", is



          %B %d %y, %H:%M:%S
          %B %d %y  %H:%M:%S
          %B %d %Y, %H:%M:%S
          %B %d %Y  %H:%M:%S
          %B %d %y, %I %p
          %B %d %y  %I %p
          %B %d %Y, %I %p
          %B %d %Y  %I %p
          %B %d %y, %I:%M %p
          %B %d %y  %I:%M %p
          %B %d %Y, %I:%M %p
          %B %d %Y  %I:%M %p
          %B %d %y, %I:%M:%S %p
          %B %d %y  %I:%M:%S %p
          %B %d %Y, %I:%M:%S %p
          %B %d %Y  %I:%M:%S %p
          %m/%d/%y %I %p
	  %m/%d/%Y %I %p
          %m/%d/%y %I:%M %p
          %m/%d/%Y %I:%M %p
          %m/%d/%y %I:%M:%S %p
          %m/%d/%Y %I:%M:%S %p
          %m/%d/%y %T
	  %m/%d/%Y %T

where, for example,

	  %m/%d/%y %I %p

indicates the the form

	month/day/<2-digit year> <12-hour clock time> 

is acceptable. For example,
	12/01/97 5 pm
and

	%m%d%Y %I %p

means that the full 4 digit year is acceptable. For example,
	12/01/1997 4 am

To run test5, enter date information that conforms to any of the formats defined in the template file shown above.

For example,


	10/12/1988 3 pm

	10/12/88   5 am

Enter a date and time

   Date and Time:   
Submit the date and time to the getdate routine