Bah, I’ve been fiddling on how to do this. I need a function that returns <hour>:<minutes> that is rounded to a quarter, but need to be atleast 30 minutes in future time.
Anyone got a good idea and how to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Add 30 minutes.
Extract date + hour on the one hand side, minutes on the other.
Divide minutes by 15, ceil the result, multiply by 15.
Build new date using date + hour and add the new minutes.