Can someone help me how to set date and time in template without actually printing it in terminal? I want to update date and time of submission in template itself without priting it in terminal. I am using python language. It will help me to know the time of submission of code in my template code.








I use cp editor for inserting date and time
can you please share your whole code , i also use cpeditor but i have no idea on how to do it
go to options -> preferences -> competetive companion -> content of the head comments -> add this line there "${time}".
you need this extension to be installed.
If you are using Visual Studio Code, first open User Snippets (by clicking the settings icon in the bottom left and you will see it), then choose python.json, or cpp.json, or any language you want..., then do like this
The instructions about user snippets are written very detailed here: Instructions
For inserting date and time:
CURRENT_YEARThe current yearCURRENT_YEAR_SHORTThe current year's last two digitsCURRENT_MONTHThe month as two digits (example '02')CURRENT_MONTH_NAMEThe full name of the month (example 'July')CURRENT_MONTH_NAME_SHORTThe short name of the month (example 'Jul')CURRENT_DATEThe day of the month as two digits (example '08')CURRENT_DAY_NAMEThe name of day (example 'Monday')CURRENT_DAY_NAME_SHORTThe short name of the day (example 'Mon')CURRENT_HOURThe current hour in 24-hour clock formatCURRENT_MINUTEThe current minute as two digitsCURRENT_SECONDThe current second as two digitsCURRENT_SECONDS_UNIXThe number of seconds since the Unix epoch