ParseDateTime() + FormatDateTime() Functions

Seems silly, but I have to ask why this isn’t working. I have tried to generate the long integer output, yet Touch Tools preview isn’t generating the expected output. I have tried many formats (see below, I won’t bore you with all of them). Ultimately I want the date() + time() values to be output for naming a CSV file automatically. However the time() output uses colons (:), and a filename cannot have colons. Any help with the syntax here would be appreciated. I can’t get the Help documentation example to work!

ParseDateTime(“Jan27-2019”,“MMMdd-yyyy”)
ParseDateTime(“Jan27-2019”,“MMMDD-yyyy”)
ParseDateTime(“Jan27-2019”,“MMMdd-YYYY”)
ParseDateTime(Jan27-2019,“MMMdd-yyyy”)
ParseDateTime(Jan27-2019,“MMMDD-yyyy”)
ParseDateTime(Jan27-2019,“MMMdd-YYYY”)
Parsedatetime(“Jan27-2019”,“MMMdd-yyyy”)
Parsedatetime(“Jan27-2019”,“MMMDD-yyyy”)
Parsedatetime(“Jan27-2019”,“MMMdd-YYYY”)
Parsedatetime(Jan27-2019,“MMMdd-yyyy”)
Parsedatetime(Jan27-2019,“MMMDD-yyyy”)
Parsedatetime(Jan27-2019,“MMMdd-YYYY”)

Image screenshot below from the F1 Help documentation, Fluent Control Ver 3.7

image

And what does “double” denote here. I also see “MM” in the place of minutes, which should be “mm”, so now I’m loosing faith in the help documentation.

i’ve always used substring function for date & time, to then concat the required format, with “-” or “_” as needed

1 Like

You can always strip off the colons using the substring function.

For getting the value of the function into TouchTools, if you save it to a variable first, then display the variable in TouchTools, it works. Example code attached.

Mike Mueller
Nucleus Automation Partners LLC

2 Likes

The following works fine for me with CSV:

Was set up for my first script and then never touched and only copied… :smiley:

1 Like

@Dirk , Thanks! That looks a lot cleaner then my mess below:

For reference, this is what I heard back from Tecan (below). I’ve nested their functions, ensured “myTimeStamp” was a string variable, and it worked as expected.

Nested functions within Set Variable:
image

1 Like

Thanks for sharing their solution. Nice to see the step by step of the nesting.
I personally use a similar approach as @Dirk. Set it as a subscript and call it from other scripts as needed.

1 Like