joer80 Posted September 10, 2021 Share Posted September 10, 2021 What is the best way to get datetime field as the unix timestamp? (Not formated) I am grabbing the formatted date and putting it back to a unix timestamp and figure, it would be better to just grab the unformatted data! $s = strtotime($location->location_message_start); Thanks! Link to comment Share on other sites More sharing options...
iank Posted September 10, 2021 Share Posted September 10, 2021 The answer's almost in your question! $s = $location->getUnformatted('location_message_start'); 2 Link to comment Share on other sites More sharing options...
joer80 Posted September 10, 2021 Author Share Posted September 10, 2021 22 minutes ago, iank said: The answer's almost in your question! $s = $location->getUnformatted('location_message_start'); I knew this was simple! Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now