datetime counter script modification

mastubbs

Hi All,

I am using a small script to display some counters counter (times since a certain datetime values) - now working thanks to member vwphillips. I have been trying to work out how to change the script so that the format of the results is a little different, but im stumped.

The format of the counter is currently %%D%% Days %%H%%:%%M%%:%%S%%. However, i would like the format to be just %%H%%:%%M%%:%%S%% if the total time is less than 24 hours, otherwise i would like it to say 'more than 1 day' (for 24-48 hours), 'more than 2 days' (for 48-36 hours), etc...

mastubbs

Thanks vwphillips for the help again.

Actually that's not quite what i meant to achieve, I should explain better: The datetime values are passed from php. The values may be anything from seconds ago to days ago. I was aiming for the script to output times in hours, mins and seconds if the datetime value is recent (less than 24 hours), but just the number of days if it is older (more than 24 hours).

Eg, if the datetime now is : 06/22/2013 19:50

then datetime 06/22/2013 19:40 would display as 0 hours 10 mins 0 seconds
and datetime 06/21/2013 19:55 would display as 23 hours 55 mins 0 seconds
and dateitme 06/21/2013 19:00 would display as more than 24 hours
and datetime 06/20/2013 19:00 would display as more than 48 hours (etc... in 24 hour increments)

mastubbs

Hi,

Thanks again for the efforts- Not quite what im aiming for either but its getting closer i think. However, its now displaying a count down timer to future dates, where as i want it to be a count up timer from past dates (like in the past couple editions).

Using DisplayFormat:" ,H%hours,M,S% " is closest to what im after, but it now counts the total number of hours, where as i want it to display H hours, M mins S secs if hrs<24, otherwise simply say 'more than 1 day' if hrs>24 (and not display a value for mins or secs at all).... 'more than 2 days' if hrs>48 etc...