[Bug]Times fields treated as date fields
Here's another bug. When a field is set to text in WADA and is validated for Time (not date or date/time) it is displayed and treated as a date. In my particular database this is a time only field.
From Results page:
<?php echo(($row_WADASCRUBIT['SCRUBTIME'])?date('n/d/Y',strtotime($row_WADASCRUBIT['SCRUBTIME'])):''); ?>
This converts my times into dates.
More applicable would be:
<?php echo(($row_WADASCRUBIT['SCRUBTIME'])?date('g:i A',strtotime($row_WADASCRUBIT['SCRUBTIME'])):''); ?>
Also issues on insert with these fields:
. $WA_AB_Split . "".((isset($_POST["TIMESCRUB"]) && $_POST["TIMESCRUB"]!="" )?date("Y-m-d H:i:s", strtotime($_POST["SCRUBTIME"])):"") ."" . $WA_AB_Split .
The insert is trying to convert the value into a date/time which is not a valid value for that field.
Also, I believe the server side validation is attempting to validate a datetime style field as well, which doesn't work.
I have changed the following for the time fields to:
$_POST["TIMESCRUB"]!="" )?date("H:i:s", strtotime($_POST["SCRUBTIME"])):"")
This returns the correct value for the database (die() tested), however the validation fails so I don't think it likes what it is seeing.
Please advise on a quick fix for this one please. :)