Jump to content

how to add conditions to timestamp


Recommended Posts

this is part of my sql statement where i am completely stuck: SELECT *,month(timeStamp) AS month,day(timeStamp) AS day, year(timeStamp) AS year, DATE_FORMAT(timeStamp + INTERVAL 6 HOUR,'%H:%i') AS showtime FROM basically this works brilliantly but if lets say the time before i add 6 hours is between 18:00 - 23:59 i need to add 1 day to the day value. Any help would be great.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...