14 lines
785 B
Plaintext
14 lines
785 B
Plaintext
CHARACTER string*40
|
|
|
|
WRITE(Text=string, Format='UCCYY-MM-DD') 0 ! string: 2010-03-13
|
|
|
|
! the U-format to write date and time uses ',' to separate additional output formats
|
|
! we therefore use ';' in this example and change it to ',' below:
|
|
WRITE(Text=string,Format='UWWWWWWWWW; MM DD; CCYY') 0 ! string = "Saturday ; 03 13; 2010"
|
|
READ(Text=string) month ! first numeric value = 3 (no literal month name available)
|
|
EDIT(Text='January,February,March,April,May,June,July,August,September,October,November,December', ITeM=month, Parse=cMonth) ! cMonth = "March"
|
|
! change now string = "Saturday ; 03 13; 2010" to "Saturday, March 13, 2010":
|
|
EDIT(Text=string, Right=' ', Mark1, Right=';', Right=3, Mark2, Delete, Insert=', '//cMonth, Right=';', RePLaceby=',')
|
|
|
|
END
|