The450Man 0 Posted December 11, 2015 Report Share Posted December 11, 2015 I have a script that generates a daynumber. Ex today is day 345. I want to calculate 12 for the month and 11 for the day. How can this be done? Id assume with Javascript. Quote Link to post Share on other sites
deliter 203 Posted December 12, 2015 Report Share Posted December 12, 2015 set(#month,$eval("new Date().getMonth()+1"),"Global") set(#day,$eval("new Date().getDate()"),"Global") Quote Link to post Share on other sites
pash 504 Posted December 12, 2015 Report Share Posted December 12, 2015 Not sure if this is what you want or not. set(#DayNumber,$eval("var now = new Date(); var start = new Date(now.getFullYear(), 0, 0); var diff = now - start; var oneDay = 1000 * 60 * 60 * 24; var day = Math.floor(diff / oneDay); day;"),"Global") alert(#DayNumber)more infohttp://stackoverflow.com/questions/8619879/javascript-calculate-the-day-of-the-year-1-366 Quote Link to post Share on other sites
The450Man 0 Posted December 14, 2015 Author Report Share Posted December 14, 2015 We are close set(#month,$eval("new Date().getMonth()+1"),"Global")set(#day,$eval("new Date().getDate()"),"Global") The above lets me calculate the day and month of the current day. I need to be able to do this with the daynumber. I need to be able to input the daynumber 231 and get the Month and Day of that daynumber. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.