• Resolved Lettobi

    (@lettobi)


    Hi, I’m trying to format a field in german date format (d. M YYYY).
    The date in the field seems to be stored as d/m/yyyy. Is there a way I can convert this? If I choose “Unix Timestamp” as Fieldtype it displays unchanged and if I choose the Date-mm-dd-yy option it displays todays date in german format.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author anmari

    (@anmari)

    Hi,

    Please check using phpmyadmin how that date field is actually stored in your DB. Developers would not normally store a date like that because then the records are not sortable by that date field.

    Developers normally store dates in ISO date format or (older in Unix timestamp – a number)

    Once it is clear how it is stored in the DB, then we can look at what is needed. If it is stored in DB in YYYY-MM-DD format and just displayed as you indicate, then in the settings you can specify date format. The default setting will be your wordpress date format.

    • This reply was modified 4 years, 10 months ago by anmari.
    Plugin Author anmari

    (@anmari)

    Forgot to say, you may need https://wpusersplugin.com/related-plugins/amr-users-plus/ to choose different date formats.

    Thread Starter Lettobi

    (@lettobi)

    Thanks, I already have the amr users plus plugin.
    After some further testing, the problem seems to be that the Ultimate Member Plugin stores the date in the DB in YYYY/MM/DD (with slashes instead of dashes). Is there any way amr user lists can handle that format?

    Plugin Author anmari

    (@anmari)

    I’d need to make a mod so the plugin expects it, and then the question arises how many other punctuation forms should one allow for? Wonder why they didn’t use a standard?

    I’ll have a look over the weekend.

    Plugin Author anmari

    (@anmari)

    Please update to both new versions just uploaded.
    In field ‘nicenames’, specify the non standard date fields as type ‘date – ambiguous’.

    Then you will be able to choose formats in the ‘configure’ menus for your lists just like for the standard date formats.

    For others: See https://www.php.net/manual/en/datetime.formats.php Dates that are too “ambiguous” (eg 23/12/2000 or 12-23-2000 will simply be echoed).

    Suddenly after updating I get a couple of error notifications on top of the backend screen. Frontend seems to be running. What can I do? Should post the full list?

    Warning: include(): Failed opening ‘includes/ameta-admin-prefix-check.php’ for inclusion (include_path=’.:/usr/lib/php7.0′) in /homepages/44/d774755329/htdocs/clickandbuilds/WordPress/members/wp-content/plugins/amr-users/amr-users.php on line 75

    Plugin Author anmari

    (@anmari)

    Yikes, thanks for headsup. New file, didnt upload properly. Update coming.

    Plugin Author anmari

    (@anmari)

    Actually revert back to 4.30 for now. Need to check something so may be awhile. Should be able to do that by deleteing and reinstalling as I have downgraded it to 4.30

    Will it show up in the backend updates list?

    Thanks, received it, fixed it

    Plugin Author anmari

    (@anmari)

    OK, actually all good. Should be fine with 4.32 – increased number for clarity.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Format Date Field’ is closed to new replies.