Professional Web Applications Themes
  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. #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

  3. #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

Similar Threads

  1. Linking data, searching data, and format the data file
    By CobraC081375 in forum Macromedia Flash Data Integration
    Replies: 5
    Last Post: January 5th, 09:54 PM
  2. Load xml data in sepearate mxml file and Populate data
    By indradapps in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: June 7th, 05:44 AM
  3. New Forum / Brasil
    By Paulo Bueno in forum Macromedia Flash Flashcom
    Replies: 2
    Last Post: May 27th, 11:55 AM
  4. [OFF] Brasil no fórum
    By Troyan in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: January 29th, 03:40 AM
  5. Replies: 1
    Last Post: July 23rd, 05:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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