Hi. I'm retrieving a record and populating the data into input fields. there is a column called fld_order_date type timestamp. How do i retrieve the date?
i have the usual retrieval:
$stmt = $conn->prepare("SELECT * FROM tbl_orders_a154287 WHERE fld_order_id = :oid");
$stmt->bindParam(':oid', $oid, PDO::PARAM_STR);
$oid = $_GET['edit'];
$stmt->execute();
$editrow = $stmt->fetch(PDO::FETCH_ASSOC);
the input field :
<input name="orderdate" type="date" readonly value="<?php if(isset($_GET['edit'])) echo $editrow['fld_order_date']; ?>">
right now what displays in the textbox is : dd/mm/yyyy