This topic is locked

date/time not working in Add Screen

12/7/2005 1:59:54 PM
PHPRunner General questions
D
defcon2000 author

Hello,
I have a field in mysql that is defined as datetime and when I manually put in the date or time it works or insert a record manually.
If I use the Add screen which has now() defined, I only get the date and not the time. After adding the record, the date shows but the time is 00:00:00.
If I click on Edit, the date will only show and not the time. How can I get both to show?
We want both the date and time to show upon record add.
Rgds,

admin 12/8/2005

Hi,
we'll fix this issue in the next PHPRunner release.
To use time values with the current version please modify functions.phpfile in

C:\Program Files\PHPRunner\source\include folder.

Locate the following line there:

$time=localdate2db($value);



and replace it with:

$time=localdatetime2db($value);


Then rebuild your pages.

D
defcon2000 author 12/8/2005

I have actually tried that and still does not work. In the Formatting screen, should I use "Short Date", "Long Date" or "Time"?
Rgds,

admin 12/9/2005

Please try to use TimeView type and DateEdit type on Formattingtab in PHPRunner.

Also please set Simple edit box Edit format for this field.

D
defcon2000 author 12/9/2005

Still does not work.
Thanks in advance

S
sloftus 12/9/2005

Hi defcon2000,
I have this working with datetime in mysql. In step 8 of 12 I first set Edit as to Hidden, then set the default to now() under Edit format. I then change Edit as from Hidden to Read Only and View as to Time. Note that if at any time you change the Edit as field to Text you lose the now() default setting and have to re enter it as described above. Date andtime both appear correctly.
Hope this helps
Steve

D
defcon2000 author 12/10/2005

EUREKA, It works. Thanks a million.