Date Format

QuestionsDate Format
Alfonso Cabrera asked 6 years ago


It is possible to format the date field to something like this:


Thank you.

2 Answers
Abu Ghufran answered 6 years ago

The / character may conflict in date conversion. Instead you can have '01 Jan 2015' date format.

$col["formatter"] = "date";
$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d M Y');

If you just want to display grid date, with no add/edit/search operations, you can have:

$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/M/Y');

Alfonso Cabrera answered 6 years ago

Thank you!!! That is what I was looking for.

Your Answer

0 + 3 =

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?