This topic is locked

24 hour time format

11/24/2009 5:22:49 PM
PHPRunner General questions
B
bobby123 authorDevClub member

Hi
I want to set the time format on my table view to 24 hour time format, at the moment it always shows in 12 hour format even though my time picker is set to 24 hour format. How do I set the the table view format to only display 24 hour format for my time field.
Thanks

J
Jane 11/25/2009

Hi,
format of time is dependent on your regional settings.

Also you can format time manually using custom format on the "View as" settings dialog on the Visual Editor tab.

B
bobby123 authorDevClub member 11/25/2009



Hi,
format of time is dependent on your regional settings.

Also you can format time manually using custom format on the "View as" settings dialog on the Visual Editor tab.


Thanks Jane
but what symtax will i use, do you have a sample
thanks

J
Jane 11/25/2009

Hi,
here is just a sample:

$value = date("H:m:s",strtotime($value));



More info here:

http://php.net/manual/en/function.date.php

B
bobby123 authorDevClub member 11/25/2009



Hi,
here is just a sample:

$value = date("H:m:s",strtotime($value));



More info here:

http://php.net/manual/en/function.date.php


Thanks for the quick reply, but this hasn't worked for me, I have a table were the add page view has a date field which has a date picker set to 24 hr, but no matter what the user selects it displays in 12 hr clock on the list page. I know this is due to the regional settings but surely there has to be a way of formatting the time on list page.

I have tried the the solution Jane and yourself gave me but when I use it I loose the date picker in the add page view as it takes on the Custom view value which I only want to apply to the list page.
Hope I have explained my issue better
thanks for your help

J
Jane 11/26/2009

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.