Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the community forum?
All Topics
Edward

Date format not being applied in showing date fields in columns

Me again.

I have a date field from a custom post type, and want to display this using a custom date format (i.e. not the standard WordPress format).

I have set the field type to “Date” in Admin Columns and have then entered this in the format box:

l, F j, Y

This is your own example from the admin screen and should parse a date to show this:

Saturday, June 6, 2014

Instead, I get this:

06/04/2014 10:00am

Any ideas why? Note that this isn’t even my default WordPress format, which is currently set to:

D, F j, Y @ G:ia

Any ideas?

5 years, 3 months ago
Jesper
Developer

Hi Ed,

What’s the raw format in which the date is stored? Could you try setting the “Field type” for the “Custom field” column to “Default” and let us know what the column contents are then?

With kind regards,
Jesper

5 years, 3 months ago
Edward

Hi Jesper,

The raw format for the custom field is of the “datetime” type, according to the Pods admin interface (“Edit Pods”).

Interestingly, if I change the format to “Default”, the display of the field doesn’t change at all. It still shows

06/04/2014 10:00am

for time/date data entered as June 4th, 2014, 10:00.

Cheers,

Ed

5 years, 3 months ago
Jesper
Developer

Hi Ed,

Unfortunately, Pods seems to store the dates in quite an unconventional format. We try to parse dates properly, but in some cases, like with AM/PM-notation, we just can’t do it. Doesn’t Pods have a way to store dates as, for example, UNIX timestamps?

With kind regards,
Jesper

5 years, 3 months ago
Edward

Hi Jesper,

Ah, OK. I have no idea how Pods stores dates, unfortunately. I’m a very basic user of WordPress really, just getting my head around how to get the most out of the software without too much programming.

I’ll have to work with the Pods guys on this, then, I think.

My only other option is writing my own Admin screens, which it seems I’ll have to do.

Cheers,

Ed

5 years, 3 months ago
Jesper
Developer

Hi Ed,

You could also try creating your own column type, which formats the dates correctly! We have a tutorial for creating your own column types available here.

With kind regards,
Jesper

5 years, 3 months ago

You must be logged in to reply to this topic.