• Morning.
    I want to define in /wordpress/wp-admin/options-general.php?updated=true that the time in my blog appears in the format G Uhr i (for example: instead of 7:01 pm it should be shown 19 Uhr 01). If I try to define that format by input G Uhr i the output is 19 109225091407Wed, 11 Aug 2004 19:01:54 +0000 01. I know that the Problem is to make PHP ignoring the letters of Uhr. But how can I escape them?
    Thanks and regards. Friedrich

Viewing 8 replies - 1 through 8 (of 8 total)
  • There is a link in options to the php date time codes. No need to edit your own php code.

    Thread Starter vatolin

    (@vatolin)

    The link I know and the PHP time codes too. But I want to insert a special word (??Uhr?? german for o’clock) instead of ??:?? between the G-code and the i-code. Imagine you would like to have a time format like ??6 o’clock 35 minutes am??. What would you insert into the field for ??Default time format: [ ]???

    Ahh. Einschulegen sei.

    https://de2.php.net/date
    I believe the solution is something like “G \U\h\r i”
    HTH.

    Thread Starter vatolin

    (@vatolin)

    Maybe it es something _like_ that. But _this_ is it not. ??

    Thread Starter vatolin

    (@vatolin)

    Does somebody know the answer now?

    Thanks in advance and kind regards. Friedrich

    Hi Friedrich

    I didn’t found it within the php-Site you’ve mentioned, but you can change it over the Internet-Admin-Interface. Login as Administrator and choose the menu “Options” and go to the Tab “General” (I know – this must be the php-Site you said, but… I couln’t find the solution there).

    Then… In the field “Default time format:” type in “G:m” and you get away am and pm – but I didn’t get out, how you can write “Uhr” behind the time bzw. between the hour and minutes. Greez from Zurich, Elle

    Sorry… missed the part about “want to replace the : with Uhr”.

    I’ve found a tutorial at https://www.phptutorial.info/learn/datetime.html#localtime

    And this might be your solution, which has to be put into the php-Site (does not work over the web-interface):
    <?php print date(“H”) ?> Uhr <?php print date(“i”) ?>

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How can I get time format like: G Uhr i’ is closed to new replies.