Date format help

QuestionsDate format help
Shumaila Khan asked 5 years ago

I am trying to format date – timestamp.

* PHP Grid Component
* @author Abu Ghufran <[email protected]> –
* @version 1.5.2
* @license: see license.txt included in package
// include db config

// set up DB

// include and create object

$g = new jqgrid();

$opt["caption"] = "Info";
// set table for CRUD operations

$g->table = "info";
"showhidecolumns"=>true, // allow/disallow delete
"rowactions"=>true, // show/hide row wise edit/del/save option
"autofilter" => true, // show/hide autofilter for search
// render grid
$out = $g->render("my_grid_1");

$themes = array("black-tie","blitzer","cupertino","dark-hive","dot-luv","eggplant","excite-bike","flick","hot-sneaks","humanity","le-frog","mint-choc","overcast","pepper-grinder","redmond","smoothness","south-street","start","sunny","swanky-purse","trontastic","ui-darkness","ui-lightness","vader");
$i = rand(0,8);

// if set from page
if (is_numeric($_GET["themeid"]))
$i = $_GET["themeid"];
$i = 15;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" ""&gt;
<title>Sendgrid Logs</title>
<link rel="stylesheet" type="text/css" media="screen" href="../../lib/js/themes/<?php echo $themes[$i]?>/jquery-ui.custom.css"></link>
<link rel="stylesheet" type="text/css" media="screen" href="../../lib/js/jqgrid/css/ui.jqgrid.css"></link>

<script src="; type="text/javascript"></script>
<script src="../../lib/js/jqgrid/js/grid.locale-en.js" type="text/javascript"></script>
<script src="../../lib/js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="../../lib/js/jqgrid/js/jquery-ui-custom.min.js" type="text/javascript"></script>
<div style="margin:10px">
<form method="get">
<!– Choose Theme: <select name="themeid" onchange="form.submit()">
<?php foreach($themes as $k=>$t) { ?>
<option value=<?php echo $k?> <?php echo ($i==$k)?"selected":""?>><?php echo ucwords($t)?></option>
<?php } ?>

<?php echo $out?>

2 Answers
Abu Ghufran answered 5 years ago

If your database field datatype is date or datetime or timestamp, then you can refer demos/integration/datepicker.php from package for formatting example and datepicker integration.

Abu Ghufran answered 5 years ago

The link seems to have real email address data, so it is not recommended to share on forum.
Question is hidden now.

Your Answer

3 + 15 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?