Automate Daily File Import
Breanna_28
Forums
Hi there,
I am working in the IDEA server version and am trying to write a script that will automatically import a file that is sent to our server daily. The file name has the prior day's date at the end. I have tried using a function that works when I evaluate it within the 'Criteria' window, but within my script I keep getting an error. My line of script with the error looks like this:
- task.UploadToLibrary Current + "PD_SmartStreamToIDEA"&(CurlVal(Dtoc(Date(), "YYYYMMDD"),",",".")-1)& ".csv", "Source Files", true
The error I am receiving says the following:
- Sub or function not defined: Dtoc
I currently have a prompted script that works fine, but am looking to create an automated one.
Does anyone know how to resolve this error or a different function that would work better?
Thank you!
Breanna
Hi Breanna, it is because the
Hi Breanna, it is because the DtoC is a function in the equation editor and not visual basic. Instead try:
format(now, "YYYYMMDD")