0

I have a table that stores the date/time as a Unix timestamp. Is it possible to query the table and pick out all the entries that are a Monday without having to query all the rows and process them outside of MySQL?

Thanks!

2
  • 1
    Yes is the answer you are looking for. RTM for the functions DAYOFWEEK() and also FROM_UNIXTIME() Commented Mar 31, 2016 at 15:02
  • Perfect! Thanks. add as answer? Commented Mar 31, 2016 at 15:08

1 Answer 1

1
SELECT * FROM your_table WHERE DAYOFWEEK(FROM_UNIXTIME(your_unix_timestamp_column)) = 2
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.