Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
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?

10 years, 6 months ago
Jesper

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

10 years, 6 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

10 years, 6 months ago
Jesper

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

10 years, 6 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

10 years, 6 months ago
Jesper

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

10 years, 6 months ago
Ilce

I have a custom meta field delivery_date used for order, this value can either be the numeric or the date format. Example: 1590364800 OR 2020-05-25

In the column settings I set Field Type as “Date”, and format could be “WordPress Date Format” F j, Y

Then the column for delivery_date, under woocommerce admin orders, values are all set in the Date format: May 21, 2020….. looks like it works.

However, If I setup Filtering option (which I need) it will show me the dates I can choose to filter in the dropdown (on the orders page), example May 21, 2020, May 11, 2020, May 1, 2020 etc…. BUT the filtering doesn’t return any results….. any idea?

4 years, 6 months ago

You must be logged in to reply to this topic.