Jump to content

Display date with python in a Font Sop

Recommended Posts

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()

Thanks !


Share this post

Link to post
Share on other sites
Posted (edited)

Hey @Lyrops,

if you use "return date" insted of "str(date)", it will work.


import datetime
date = datetime.datetime.now()
return date

Edited by morn66

Share this post

Link to post
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