Lyrops Posted May 21, 2019 Share Posted May 21, 2019 Hi everyone ! I'm trying to display the date with a font sop using python but I'm a total noob with using python. I've found some pieces of information over odforce but I can't make it work. So far I've manage to make python work inside the font SOP but the lines I'm using sending me "none" instead of giving the date. When I'm using the same script in the Python Shell it works. I feel like I'm missing something important but I don't know what. import datetime date = datetime.datetime.now() str(date) Thanks ! Od_PythonDate.hip Quote Link to comment Share on other sites More sharing options...
morn66 Posted May 21, 2019 Share Posted May 21, 2019 (edited) Hey @Lyrops, if you use "return date" insted of "str(date)", it will work. import datetime date = datetime.datetime.now() return date Edited May 21, 2019 by morn66 Quote Link to comment Share on other sites More sharing options...
Lyrops Posted May 21, 2019 Author Share Posted May 21, 2019 Perfect it's working ! Thanks Quote Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.