how to pick date from datetime format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chand basha
    New Member
    • Aug 2011
    • 12

    how to pick date from datetime format

    hi,


    how to take only date from 2011-08-24 16:12 this timestamp.
  • paulrajj
    New Member
    • Sep 2008
    • 47

    #2
    Using strtotime and date functions,
    Code:
    $d = "2011-08-24 16:12";
    $dat = date("Y-m-d", strtotime($d));

    Comment

    • chand basha
      New Member
      • Aug 2011
      • 12

      #3
      thanks for reply but my date is coming with html tags also so it is not taking.....i have taken substr and explode it and i now getting only the date....

      ok problem solved.....

      Comment

      Working...