Data Connections
General Info
Useful Snippets

6.0.1 Add a Date Stamp for a filepath

Example:

# Create file path stirng with a date stamp

import datetime
from datetime import datetime

export_path = //your//export//path//
export_filename = yourfilename.txt

start_time_now = datetime.now()
rundate = start_time_now.strftime("%Y%m%d")
run_date = str(rundate)
export_file_format = ".txt"
export_file_path = export_path + export_filename + "_" + run_date + export_file_format