View previous topic :: View next topic
Author
Message
Prajesh_v_p Active User Joined: 24 May 2006Posts: 133 Location: India
I need to add a header record to a file with date field(current date) starting from first position in the format MM/DD/YYYY. I am thing of using HEADER1, but is there any we can get the date formatted in the above format?
Thanks,
Prajesh
Back to top
murmohk1 Senior Member Joined: 29 Jun 2006Posts: 1436 Location: Bangalore,India
Prajesh,
Code:
SORT FIELDS=COPY
OUTFIL REMOVECC,HEADER1=(DATE=(MD4/))
OP:
Back to top
Prajesh_v_p Active User Joined: 24 May 2006Posts: 133 Location: India
Thanks murmohk1!!
That was what exactly I was looking for..
Back to top
William Thompson Global Moderator Joined: 18 Nov 2006Posts: 3156 Location: Tucson AZ
Prajesh_v_p wrote:
That was what exactly I was looking for..
Did you even think of looking at a manual?
DATE=(abcd)
specifies that the current date is to appear in the report record in the form 'adbdc', where a, b, and c indicate the order in which the month, day, and year are to appear and whether the year is to appear as two or four digits, and d is the character to be used to separate the month, day and year.
For a, b, and c, use M to represent the month (01-12), D to represent the day (01-31), Y to represent the last two digits of the year (for example, 05), or 4 to represent the four digits of the year (for example, 2005). M, D, and Y or 4 can each be specified only once. Examples: DATE=(DMY.) would produce a date of the form 'dd.mm.yy', which on March 29, 2005, would appear as '29.03.05'. DATE=(4MD-) would produce a date of the form 'yyyy-mm-dd', which on March 29, 2005, would appear as '2005-03-29'.
Back to top
Please enable JavaScript!