digit date format

Find out what does your audience think

digit date format

New postby ebohatch » Tue Sep 17, 2013 5:11 pm

I need to alter the digit date format from d/m/Y to m/d/Y to conform to US date format.
ebohatch
 
Posts: 3
Joined: Mon Sep 16, 2013 7:10 pm

Re: digit date format

New postby Simon » Sat Sep 21, 2013 2:24 am

Hi,

Are you using a module, or component?
User avatar
Simon
Site Admin
 
Posts: 1306
Joined: Wed Jul 13, 2011 8:53 pm

Re: digit date format

New postby ebohatch » Sat Sep 21, 2013 4:00 pm

The module, for the first and last vote dates
ebohatch
 
Posts: 3
Joined: Mon Sep 16, 2013 7:10 pm

Re: digit date format

New postby Simon » Mon Sep 30, 2013 11:35 pm

Hi,

To change the date format go to vote.php file, and change the lines 135,136
Code: Select all
if ($count_total_votes > 0) {
   $min_date = $date_format == 'str' ? date('F j, Y', strtotime($row_total['min_date'])) : date('d / m / Y',strtotime($row_total['min_date']));
   $max_date = $date_format == 'str' ? date('F j, Y', strtotime($row_total['max_date'])) : date('d / m / Y',strtotime($row_total['max_date']));
}


Change date('d / m / Y'... to what you need.

Best Regards,
Simon
User avatar
Simon
Site Admin
 
Posts: 1306
Joined: Wed Jul 13, 2011 8:53 pm


Return to Sexy Polling

Who is online

Users browsing this forum: No registered users and 4 guests

cron