โ11-28-2018 08:48 AM
Hello,
I am trying to figure out the time stamp features, and I canโt seem to get it to work.
I have on my file writer: โXXXXXXX_โ + Date.now() + .txt
But that doesnโt work, Can someone inform me on what I need to do to correct this and get this to work? I want to have YYYYMMDDHHMMSS in the time stamp.
โ11-28-2018 11:58 AM
You need to double quote the โstatic textโ part of your expression.
โ11-28-2018 12:03 PM
Again, I have done that and it is not working, I think it is cause it is being placed on a FTP server.
โ11-28-2018 12:18 PM
There should be a quote in the beginning (as the first character) and I donโt see it.
โ11-28-2018 12:56 PM
Youโll want to do something like this as the expression, but fill it in with the specifics of the hostname. As @smakkena points out, the sftp part needs to be surrounded in quotes. That creates a string that you concatenate with the Date experssion. Then you concatenate the โ.txtโ string on to the end.
"sftp://my.ftp.com/home/edi/BS/Trade/P41/out/filename" + Date.now().toLocaleDateTimeString({"format":"yyyyMMddHHmmss"}) + ".txt"
EDIT A colleague pointed out that the double quotes were being replaced by angled quotes by the community editor, which may also be impacting the parsing of the expression. You may need to correct that in the snapโs expression too.