Apr-04-2024, 01:38 PM
(This post was last modified: Apr-04-2024, 02:09 PM by Gribouillis.)
This is the code I am having an issue with
04/04/2024 09:27," EDT,",10000.0
I need it like this
04/04/2024 09:27 EDT,10000.0
but can not figure out how to get that format
tagPath = system.tag.read("[e1ccd]Extruder/E1_ExtruderAData_MeltPumpAdapterPressure_PV") today = system.date.format(system.date.now(), "MM/dd/yyyy HH:mm") dataRow = [today," EDT,",tagPath.value] with open(filePath, 'a') as csvfile: writer = csv.writer(csvfile, lineterminator='\n') writer.writerow(dataRow)The line writes to the file like this
04/04/2024 09:27," EDT,",10000.0
I need it like this
04/04/2024 09:27 EDT,10000.0
but can not figure out how to get that format
Gribouillis write Apr-04-2024, 02:09 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.