Data no Formato Brasil em PHP

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Data no Formato Brasil em PHP

    Tenho um sistema onde as datas j? foram cadastradas e preciso que me retorne ao
    inv?s de 2005/03/23 , retorne 23/03/2005.

    Algu?m sabe como posso exibir uma data no formato brasileiro?

    Uso o Dreamweaver MX e PHP + MYSQL

    Valeu!!!


    Filipe Souza Guest

  2. Similar Questions and Discussions

    1. Linking data, searching data, and format the data file
      I'm sorta new to flash and integrating data and components...I'm usu. an interface designer. I'm trying to link a combo box to a file doesn't...
    2. New Forum / Brasil
      Amigos(as), Gostaria de informar que estamos criando um Forum sobre Flashcom totalmente em português Este Fórum é destinado a programadores...
    3. [OFF] Brasil no fórum
      Só pra saber: tem algum brasileiro aqui além de mim? Quem for do Brasil dá um salve! Everybody who don't speak portuguese, ignore this post. ...
    4. Display data from database in a scrollable data grid on an ASP Page
      Hi All, I want to display data from database in a scrollable data grid on an ASP Page. I want to use it for entering data also. Should i have to...
    5. abnormal program termination with dynamic data, but not with fixed data
      hi everyone. I am stumped! I have code that is part of a simple persistent object manager. The system takes an object, builds an update...
  3. #2

    Default Re: Data no Formato Brasil em PHP

    On Tue, 29 Mar 2005 13:05:57 +0000 (UTC), Filipe Souza
    <webforumsuser@macromedia.com> wrote:
    > Tenho um sistema onde as datas j? foram cadastradas e preciso que me
    > retorne ao
    > inv?s de 2005/03/23 , retorne 23/03/2005.
    >
    > Algu?m sabe como posso exibir uma data no formato brasileiro?
    >
    > Uso o Dreamweaver MX e PHP + MYSQL
    >
    > Valeu!!!
    >
    >
    Hi Filipe, You might want to check out our PHAKT implementation where it
    allows you localized the dates for the MySQL + PHP.
    [url]http://www.interaktonline.com/Products/Free-Products/PHAkt/Overview/[/url]


    --
    Alexandro Colorado
    ------------------------------
    Support Engineer
    InterAKT Online
    [url]http://www.interaktonline.com[/url]
    Tel: 40(21) 312.5312
    Alexandro Colorado Guest

  4. #3

    Default Re: Data no Formato Brasil em PHP

    If you have the field in the database in datetime format in the MySQL
    database, use the UNIX_TIMESTAMP command to convert it into a UNIX timestamp

    eg SELECT UNIX_TIMESTAMP(dateField) AS myDate FROM table

    Then use the PHP date() command to convert it into the correct format eg

    date("d/m/Y",$recordset_name['dateField']);

    Alternatively, pull the date from the database as normal, use the PHP
    explode() command to split the date into the array by the /. You can then
    rearrange the parts in the correct order.


    --
    Gareth - TMM Dreamweaver
    [url]http://www.dreamweavermxsupport.com/[/url]
    [url]http://www.garethdp.com/[/url]

    PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
    [url]http://www.phploginsuite.co.uk/[/url]

    Co-Author: Dreamweaver MX: Instant Troubleshooter - Apress
    Co-Author: Practical Intranet Development - Apress
    Co-Author: Dreamweaver MX: Advanced PHP Web Development - Apress
    Co-Author: Dreamweaver MX: PHP Web Development - Wrox


    gareth 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