This topic is locked

Date + Time format help

4/10/2008 7:53:20 AM
PHPRunner General questions
J
jack knowles author

Hi forum,
I need some help on formatting date & time.
Fields: start_time, start_date
_Database Format

_Date Format: 2008-04-10

Time Format: 12:30:23
_PHPRunner executed project screen display

_Date Format: 10/04/2008

Time Format: 12:30:23
_Required screen format

_Date Format: 10/04/08

Time Format: 12:30
Thanks in advance
JK

J
Jane 4/11/2008

Hi,
use custom format for these fields on the "View as" settings dialog on the Visual EDitor tab.

Here is a sample:

$value = date("d/m/y",strtotime($value));


$value = date("h:i",strtotime($value));

J
jack knowles author 4/11/2008

Perfect!!!
Thank you so much Jane.
JK

R
ringlis1 4/11/2008

This was helpfull as I needed this too. However, I also need to adjust for local time. Ie PST time.
How can I adjust this when I add a new record. I am using TIMESTAMP for the MySQL database and PHPRunner only displays the date, so i have a second field to display the time.
Is there a global setting for this? Or any ideas?

J
Jane 4/14/2008

Hi,
check additional parameters of date() function here:

http://php.net/manual/en/function.date.php
To modify entered value before adding to the database use Before record added event on the Events tab.