saifee 1 Posted July 29, 2016 Report Share Posted July 29, 2016 I want to store today's day for eg: "Friday" in a variable from the system date/time. How to do this? Thanks,Saifuddin Quote Link to post Share on other sites
pash 504 Posted July 29, 2016 Report Share Posted July 29, 2016 tryhttp://wiki.ubotstudio.com/wiki/Run_python_with_result alert($run python with result("import datetime mydate = datetime.date(1985,3, 13) #year, month, day mydate.strftime(\"%A\")")) Quote Link to post Share on other sites
saifee 1 Posted July 29, 2016 Author Report Share Posted July 29, 2016 Thanks, its working with a static date. I want to run the same code but with the current system date and get the day of the week. Pls help. Quote Link to post Share on other sites
pash 504 Posted July 29, 2016 Report Share Posted July 29, 2016 use alert($run python with result("from datetime import date import calendar my_date = date.today() calendar.day_name[my_date.weekday()]")) Quote Link to post Share on other sites
saifee 1 Posted July 29, 2016 Author Report Share Posted July 29, 2016 Thanks very much for the help :-) 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.