CrazyEngineers
  • Timestamp in php

    Vishal Sharma

    Vishal Sharma

    @vishal-pysGmK
    Updated: Oct 26, 2024
    Views: 1.3K
    Can I get a quick way to have a timestamp of date and time concatenated together like,
    28_05_15_10_02 so that I can have some uniqueness in the storage names? Currently have a lot of pending work hence not making a google search..

    I tried using DateTime::getTimeStamp() in laravel but looks like its a non-static method. Any other solution for that would be helpful

    Thanks
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Vishal Sharma

    MemberMay 27, 2015

    hmm, I think I found the answer. Will be useful for others I think

    <?php
    $time = date ( 'd_m_y_H_i_s' , time());
    echo $time;
    ?>
    
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register