Time Element Format : 12 hour AM/PM?

hominid4

Member
Hi, is it possible to format the Time Element (fabrik_element > time) so that it's in a 12 hour format and contains AM/PM? Instead of 17:00 have 5:00PM. I've tried things such as "return date('h:ia');" in the Default Eval but no luck.

Thanks!
J!3.2
Fabrik 3.1rc1 latest Github
 
When i want something like that, what i do is first enter that value in a php variable. Something like:

$theNewDate = $row->data->date_time_raw;
echo $theNewDate;

From here you can sould be able to do with the string whatever you want.
 
It may be complex as there is no DATETIME (as cyberholic probably assumed) but TIME field behind. Its general purpose is to show e.g durations, but of course not only - that means also time separately from date.
I think it should be possible, just a question for me how and how long it would be take. Perhaps it would be easier to make a new option only for this formatting, not any other else. Anyway, I believe, the special formatting applies only for readonly mode
 
Thanks everyone, all makes sense. I've been playing around with it but with no luck. That's cool, I'm using it for a sports website for the schedule table, I'll just use a text field for the Time column for now which fine.

Thanks again.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top