I would really be thankful for any help. I'm a ColdFusion coder and do e-commerce for a company. A guy that just quit built a page in Perl that we use in tracking the number of hits on what date by writing them to a text file. The problem is this guy formated his dates to show 2001121. That could be mean January 21st, 2001 or December 1st, 2001!!!
I want it to write the date as 20010121 or 2001-01-21 so I can parse through these text files and count it using an application I already built.
The current Perl code that sets the date is:
($d,$d,$d,$d,$m,$y)=localtime();
$newdate=($y+1900).($m+1).$d;
He then appends $newdate to a text file for each hit.
Could someone please help me with a code that can will change $newdate to yyyy-mm-dd or yyyymmdd?
Thanks so much.
I want it to write the date as 20010121 or 2001-01-21 so I can parse through these text files and count it using an application I already built.
The current Perl code that sets the date is:
($d,$d,$d,$d,$m,$y)=localtime();
$newdate=($y+1900).($m+1).$d;
He then appends $newdate to a text file for each hit.
Could someone please help me with a code that can will change $newdate to yyyy-mm-dd or yyyymmdd?
Thanks so much.