convert Unixtime to microtime

22 Views Asked by At

The data aer in der MySql database, the dates in unixtime. I coulde save it ohterwise, the input from the user is a norlman date dd.mm.YYY, I transform it as a Unixtime in to the database.

Now I should make an output as a sheduler or a grantt. I found jQuery.Gantt but tis works with microtime.

How can I convert in to microtime?

The does not work properly, the dates are not right. It shoud be 1st of April, but it is 9th of Janury

How can I get the right dates, or do you kow a better tool to display the dates in ea timeline?

Thank you very much

      var demoSource = [                
<?php $querywf = "SELECT * FROM `t_1` ";
foreach ( $mysqli->query( $querywf ) as $rowwf ) {
  ?>
            {
                name: "<?php echo $rowwf['tfname'];?>",
                desc: "<?php if(!empty($rowwf['ferienab'])){ echo date("d.m.y",$rowwf['ferienab']);}?>-<?php if(!empty($rowwf['ferienbis'])){ echo date("d.m.y",$rowwf['ferienbis']);}?>",
                values: [{
                from: <?php if(!empty($rowwf['ferienab'])){ echo $rowwf['ferienab'];}?>000,
                to: <?php if(!empty($rowwf['ferienbis'])){ echo $rowwf['ferienbis'];}?>000,  
                label: "<?php if(!empty($rowwf['ferienab'])){ echo date("d.m.y",$rowwf['ferienab']);}?>-<?php if(!empty($rowwf['ferienbis'])){ echo date("d.m.y",$rowwf['ferienbis']);}?>",
                customClass: "ganttRed"
                }]
            },
    <?php }?>       
                ];

Priniscreen

0

There are 0 best solutions below