Mon Oct 24 00:00:26 2005 as 2005-10-24 00:00:26

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • voipcanada

    Mon Oct 24 00:00:26 2005 as 2005-10-24 00:00:26

    need to know how to change Mon Oct 24 00:00:26 2005 as 2005-10-24
    00:00:26

    thanks

  • IWT

    #2
    Re: Mon Oct 24 00:00:26 2005 as 2005-10-24 00:00:26

    date("Y-m-d H:i:s") would print in the format 2005-10-24 00:00:26.

    See: http://uk2.php.net/manual/en/function.date.php

    Comment

    • NC

      #3
      Re: Mon Oct 24 00:00:26 2005 as 2005-10-24 00:00:26

      voipcanada wrote:[color=blue]
      >
      > need to know how to change Mon Oct 24 00:00:26 2005 as 2005-10-24
      > 00:00:26[/color]

      date('Y-m-d H:m:s', strtotime('Mon Oct 24 00:00:26 2005'))

      Cheers,
      NC

      Comment

      • Chuck Anderson

        #4
        Re: Mon Oct 24 00:00:26 2005 as 2005-10-24 00:00:26

        NC wrote:
        [color=blue]
        >voipcanada wrote:
        >
        >[color=green]
        >>need to know how to change Mon Oct 24 00:00:26 2005 as 2005-10-24
        >>00:00:26
        >>
        >>[/color]
        >
        >date('Y-m-d H:m:s', strtotime('Mon Oct 24 00:00:26 2005'))
        >
        >Cheers,
        >NC
        >[/color]
        I wasn't aware of this shortcut. I think I'll switch to this method for
        converting times from my apache server access logs.

        However, you meant:
        echo date('Y-m-d H:i:s', .....
        not
        echo date('Y-m-d H:m:s', .....

        (i for minutes, not m)

        --
        *************** **************
        Chuck Anderson • Boulder, CO

        Integrity is obvious.
        The lack of it is common.
        *************** **************

        Comment

        • NC

          #5
          Re: Mon Oct 24 00:00:26 2005 as 2005-10-24 00:00:26

          Chuck Anderson wrote:[color=blue]
          > NC wrote:[color=green]
          > >
          > > date('Y-m-d H:m:s', strtotime('Mon Oct 24 00:00:26 2005'))[/color]
          >
          > I wasn't aware of this shortcut. I think I'll switch to this method for
          > converting times from my apache server access logs.
          >
          > However, you meant:
          > echo date('Y-m-d H:i:s', .....
          > not
          > echo date('Y-m-d H:m:s', .....
          >
          > (i for minutes, not m)[/color]

          Of course. A really dumb typo... Thank you for your correction.

          Cheers,
          NC

          Comment

          Working...