cdawg Posted August 16, 2010 Report Posted August 16, 2010 hey i was wondering if anybody knows how to change the time stamp...for instance when it submits a pirep it sends it as 12:00:00 i was wondering if anybody knew how i could change it to just submit as 12 with out the :00:00 any help in this matter would be great...thanks Quote
Administrators Nabeel Posted August 16, 2010 Administrators Report Posted August 16, 2010 You can change that display in your template, but internally, all the times are handled that way Quote
cdawg Posted August 16, 2010 Author Report Posted August 16, 2010 thanks for the reply but how do i do that...i have attempted to try that but on the fleet table it will still read the internal number Quote
Administrators simpilot Posted August 17, 2010 Administrators Report Posted August 17, 2010 Use the php date function in your template date('m/d/Y', strtotime($timevariable)) You can get the different format elements here -> http://php.net/manual/en/function.date.php Quote
cdawg Posted August 17, 2010 Author Report Posted August 17, 2010 ok where do i need to put the code..do i put it in the fleet_table.tpl??? this is my fleet_tpl code <h1><?php echo SITE_NAME?> Company Drivers </h1> <!-- Fleet Table Version 2.0.- - fleet_table.tpl - By Mitchell W http://forum.phpvms.net/topic/1522-fleet-table/ CHANGES FROM 1.1: Added image Added download --> <table border="1"> <thead> <tr> <td width="42"><div align="center"><b>Image</b></div></td> <td width="34"><div align="center"><b>Type</b></div></td> <td width="57"><div align="center"><b>Year</b></div></td> <td width="78"><div align="center"><b>Truck # </b></div></td> <td width="88"><div align="center"><b>Total Miles </b></div></td> <td width="156"><div align="center"><b>Total Deliverys </b></div></td> <td width="124"><div align="center"><b>Location</b></div></td> <td width="121"><div align="center"><b>Driver</b></div></td> </tr> </thead> <tbody> <?php foreach ($fleet as $aircraft) { ?> <tr> <td><div align="center"><img src="<?php echo $aircraft->imagelink; ?>"></div></td> <td><div align="center"><?php echo $aircraft->name; ?> </div></td> <td><div align="center"><?php echo $aircraft->weight; ?></div></td> <td><div align="center"><?php echo $aircraft->registration; ?></div> </td> <td><div align="center"><?php echo $aircraft->totaltime; ?></div> </td> <td><div align="center"><?php echo $aircraft->routesflown; ?></div> </td> <?php $params = (array('a.registration'=>$aircraft->registration, 'p.accepted'=>PIREP_ACCEPTED)); $pirep = PIREPData::findPIREPS($params); $current_location = $pirep[0]->arricao; $current_location2 = $pirep[0]->arrname; ?> <td><div align="center"><?php echo $current_location.'-'.$current_location2; ?></div> </td> <td><div align="center"><?php echo $aircraft->range; ?></div> </td> </tr> <?php } ?> </tbody> </table> <br /> Quote
Administrators simpilot Posted August 18, 2010 Administrators Report Posted August 18, 2010 Something like -> <?php echo date('h', strtotime($aircraft->totaltime)); ?> should work Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.