Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Converting Date

    In PHP with MySQL:

    My table stores the date as 2003/10/07 ... (year, day, month). I want to be able to convert it to 07/10/2003 before I echo it out to the screen. Not sure how to do this?

    Thanks


    ----
    Rob Maguire
    Web Development
    bigforehand Guest

  2. Similar Questions and Discussions

    1. ASP integer date/time converting problems
      Hi Rob, This is definitely not a UTC conversion. I don't know what kind of notation it is. The best way to converting this date is by using your...
    2. Converting Date Formats?
      Howdy! I have some dates in a MySQL database that are in a 'Y-m-d' format. Is there a way to have PHP read these dates and convert them to a...
    3. Converting a text field to a date field - FM6
      I need to convert a Text field containing both auto and manually entered dates over to a Date field. The records that were autoentered move over...
    4. converting date into database date format(newbie)
      Hi! U can convert "8-Aug-03" into mysql date which requires yyyy-mm-dd format as below. <?php date("Y-m-d",strtotime("8-Aug-03")); ?>
    5. Converting raw numbers to written date
      How would you decipher a stamp like 12303 Is it 1/23/03 or 12/3/03 ------------------------------------------------- d l b j r Unambit...
  3. #2

    Default Re: Converting Date

    Try this php code:

    <?php echo date("m/d/Y", strtotime($row_Recordset1['FIELD2'])); ?>

    I hope this helps.
    --

    Best regards,

    Mike M
    Macromedia Technical Support
    Dreamweaver UltraDev / MX

    Search the Support Site -
    [url]http://www.macromedia.com/support/ultradev/[/url]
    [url]http://www.macromedia.com/support/dreamweaver/[/url]

    Macromedia Newsgroups -
    [url]http://webforums.macromedia.com/dreamweaverultradev/[/url]
    [url]http://webforums.macromedia.com/dreamweaver/[/url]

    "bigforehand" <lobber1_guy@yahoo.com> wrote in message
    news:bepd70$p6u$1@forums.macromedia.com...
    > In PHP with MySQL:
    >
    > My table stores the date as 2003/10/07 ... (year, day, month). I want to
    be able to convert it to 07/10/2003 before I echo it out to the screen. Not
    sure how to do this?
    >
    > Thanks
    >
    > ----
    > Rob Maguire
    > Web Development

    MMontero - MMTS Guest

  4. #3

    Default Re: Converting Date

    BTW, there's a TechNote about this:

    Formatting date and time values in PHP
    [url]http://www.macromedia.com/support/dreamweaver/ts/documents/php_date_format.h[/url]
    tm

    --

    Best regards,

    Mike M
    Macromedia Technical Support
    Dreamweaver UltraDev / MX

    Search the Support Site -
    [url]http://www.macromedia.com/support/ultradev/[/url]
    [url]http://www.macromedia.com/support/dreamweaver/[/url]

    Macromedia Newsgroups -
    [url]http://webforums.macromedia.com/dreamweaverultradev/[/url]
    [url]http://webforums.macromedia.com/dreamweaver/[/url]

    "MMontero - MMTS" <supportinfo@macromedia.com> wrote in message
    news:bf18d3$726$1@forums.macromedia.com...
    > Try this php code:
    >
    > <?php echo date("m/d/Y", strtotime($row_Recordset1['FIELD2'])); ?>
    >
    > I hope this helps.
    > --
    >
    > Best regards,
    >
    > Mike M
    > Macromedia Technical Support
    > Dreamweaver UltraDev / MX
    >
    > Search the Support Site -
    > [url]http://www.macromedia.com/support/ultradev/[/url]
    > [url]http://www.macromedia.com/support/dreamweaver/[/url]
    >
    > Macromedia Newsgroups -
    > [url]http://webforums.macromedia.com/dreamweaverultradev/[/url]
    > [url]http://webforums.macromedia.com/dreamweaver/[/url]
    >
    > "bigforehand" <lobber1_guy@yahoo.com> wrote in message
    > news:bepd70$p6u$1@forums.macromedia.com...
    > > In PHP with MySQL:
    > >
    > > My table stores the date as 2003/10/07 ... (year, day, month). I want to
    > be able to convert it to 07/10/2003 before I echo it out to the screen.
    Not
    > sure how to do this?
    > >
    > > Thanks
    > >
    > > ----
    > > Rob Maguire
    > > Web Development
    >
    >

    MMontero - MMTS Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139