Home  
 
  Ask Questions  
 
  Feed Back  
 
  My Questions  
 
  Contact Us  
 
  About Us  
 
 Interview Questions  
 Our Services  

Get 9,000 Interview Questions & Answers in an eBook.


  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!



    Send your Resume to 6000 Companies

  • NEW INTERVIEW QUESTIONS.COM LANGUAGES INTERVIEW QUESTIONS PHP INTERVIEW QUESTIONS DETAILS


    NewInterviewQuestions.com - Home for World's Largest Interview Questions Website.

    A D V E R T I S E M E N T




    Add to My Questions Add to My Questions | Forward Forward | Print Print


    Question Question If you have to work with dates in the following format: "Tuesday, February 14, 2006 @ 10:39 am", how can you convert them to another format, that is easier to use?

    Answer Answer The strtotime function can convert a string to a timestamp.
    A timestamp can be converted to date format. So it is best to store the dates as timestamp in the database, and just output them in the format you like.

    So let's say we have
    $date = "Tuesday, February 14, 2006 @ 10:39 am";
    In order to convert that to a timestamp, we need to get rid of the "@" sign, and we can use the remaining string as a parameter for the strtotime function.

    So we have
    $date = str_replace("@ ","",$date);
    $date = strtotime($date);

    now $date is a timestamp
    and we can say:

    echo date("d M Y",$date);


    © NewInterviewQuestions.com


    If you have the better answer, than send it to us. We will display your answer after the approval.
    Answer Answer:*
    Name Name:*
    Email Address Email Address:*
         Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
     


    Rate the above answer. Help us to know about the answer.
    Category Category PHP Interview Questions
    Rating Rating (5.0) By 6 users
    Added Added 7/19/2006
    Views Views 153831
    Rate it Rate it!
    Free Offers Free Offers: 300 Free Magazines for you. No credit card required. No Shipping Charges. Absolutely Free for 1 Year.

    Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

    Notify me when better answer is posted!
    Email:


    A D V E R T I S E M E N T





     Sponsors  
    Latest 10 Answers
    ABAP is basic (technical) side of SAP. which helps other function of business sibe ex.financial,sales,inventory& human resource.
    Cluster index work as a primary key and as we know in a single table only one primary key should be there....Hence only one records can take cluster index.
    Select Employee.*, Department.* from Employee LEFT OUTER JOIN Department ON Employee.EmpId=Department.DeptId
    Both are the connection object but SQLCLIENT using while connect with Sqlserver database and OLEDB using while connect with MS-access database and Oracle database.
    Only 1 cluster index and 255 non cluster index.
    Because it's used to read the data from the DB as Read-only manner, only forward direction not backward..hence its not supporting edit operation.
    I will throw my wife because if my wife dies ican get another but mother is only one I cannot get another
    When mistake is found by compiler is known as ERROR , when a mistake is found by tester while testing is a BUG and when mistake is found by the end user it is known as DEFECT.
    Create customer code & transporter code, create sales order, checke the payment received then released order from Finance, delivery, billing, invoice.
    Invoice is a request sent by vendor for the payment against services/goods with all the necessary details like - Price, Rate, Quantity, Vendor Name, Vendor Address, Unique Invoice Number (From Vendor), Terms & Conditions.

    G o o g l e Search

    Google

    Newinterviewquestions.com is a part of Vyom Network. Top



    Copyright ? 2008, newinterviewquestions.com. All rights reserved Privacy Policy

    Page URL: http://www.newinterviewquestions.com/interview/6178/Default.asp?cachecommand=bypass


    Download Yahoo Messenger