Results 1 to 9 of 9

Thread: How to convert date ?

  1. #1

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459

    How to convert date ?

    Hello!

    How to convert unix time stamp data to human read able date ?

    For eg. I want to get 01-01-2004 from 1234567890. This is just an example how it looks.

    Thanks!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  2. #2
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    use a combination of date and strtotime. mktime() would also be an option.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  3. #3

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    Hi!

    Any sample would be highly appericiated.

    Thanks!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  4. #4
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Hi!

    Don't be lazy, check the manual!

    Thanks!
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Look at the PHP date() function. You supply it with a format string and UNIX timestamp.

    The following would print the dat in this format: "29/09/2004 13:28"
    PHP Code:
    echo(date('m/d/Y H:i'$timestamp)); 
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  6. #6

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    Lol i am not lazy..i check the manual and atleast i did not found anything. my php editor comes with php manual...and i am unable to find anything that is why i posted here!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Originally posted by ober0330
    Hi!

    Don't be lazy, check the manual!

    Thanks!
    I even posted a link to help him. Now arn't I kind
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  8. #8

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    Who's the kind one ? visualAd visualAd
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  9. #9
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by AvisSoft
    Lol i am not lazy..i check the manual and atleast i did not found anything. my php editor comes with php manual...and i am unable to find anything that is why i posted here!
    Did you check the Date and Time Functions section?
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

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



Click Here to Expand Forum to Full Width