How to Change the Format of a Date

Hi All,

this is my second post, last post reply was very helpful.

I have a data that has date in DD/MM/YYYY (07/11/2008) format i want to replace the backslash by a dot(.) so that my awk script can read it inside the C shell script that i have written.

i want to change 07/11/2008 to 07.11.2008.
This thing can be done by traversing the date's , if u find "/" replace by ".". But how do i implement that.
Is there any one liner for this or if there is something that i can modify in the awk statement with the input value 07/11/2008 so that i dont have to covert it to 07.11.2008.

I shall wait for your reply

thanks,
Aditya:):frowning:

NewDate=`echo $YourDate | sed 's!/!.!g'`

Regards

@asirohi
You should read man tr

tr '/' '.' <<< $yourdate

csh is not recommended for scripting:
Top Ten Reasons not to use the C shell
C shell problems
Csh Programming Considered Harmful

Avoid ambiguous date formats; use ISO: 2008-11-07

In the awk script:

gsub( /\/,".",date)