D
\Dandy\ Randy
Hello peoples,
I could use some help writing a script that will create and print the date
in a special format. Here is what I am looking to accomplish:
When my main script is executed:
assign the date to a variable in this format = month/day/year all in two
digit format like so: 09/08/03
something like:
A) if $monthday is less than 10 ... add a "0" before it ... thus creating
01, 02 ,03 etc for the first 9 days of a month, otherwise all other
monthdays can remains in 2 digit format
B) if $month = "January" then $month = "01" and so on for other months
C) if $year = 2003 then remove first two digits, thus creating 03 and so on
for other years
D) Then assemble the date like this: $today = $monthday/$month/$year
E) print $today
I've been search all the doc's I can today but havent been able to find
examples on how to do this. If you can help me, I would be forever greatful.
TIA
Randy
I could use some help writing a script that will create and print the date
in a special format. Here is what I am looking to accomplish:
When my main script is executed:
assign the date to a variable in this format = month/day/year all in two
digit format like so: 09/08/03
something like:
A) if $monthday is less than 10 ... add a "0" before it ... thus creating
01, 02 ,03 etc for the first 9 days of a month, otherwise all other
monthdays can remains in 2 digit format
B) if $month = "January" then $month = "01" and so on for other months
C) if $year = 2003 then remove first two digits, thus creating 03 and so on
for other years
D) Then assemble the date like this: $today = $monthday/$month/$year
E) print $today
I've been search all the doc's I can today but havent been able to find
examples on how to do this. If you can help me, I would be forever greatful.
TIA
Randy