https://www.onlinegdb.com/online_python_compiler import datetime as dt name = input("enter name: ") x = dt.datetime.now() print(x.year) print(x.month) print(x.day) print("%s-%s%s%s" % (name,x.year+1234,x.month,x.day))