Discussions

 View Only
Expand all | Collapse all

Pipeline Help: Inserting a Timestamp Into the File Name (SharePoint Channel)

  • 1.  Pipeline Help: Inserting a Timestamp Into the File Name (SharePoint Channel)

    Posted 01-13-2022 13:53
    Hello! I am generating a CSV file 6x day (i.e. every 4 hours) and uploading it to a SharePoint folder. Everything works great overalI; I am currently attaching the record_id to the beginning of each file (to solve for the latest file overwriting the last one), however I am being asked if we can begin each file with a date/time stamp instead if possible.

    I successfully used {{time.now|date_ymd}} to create a date but nothing is working for time; not {{time.now}} nor {{time.today}}. Error messages are embedded for context. Has anyone succeeded doing this?


    ------------------------------
    Nelson Arce
    ------------------------------


  • 2.  RE: Pipeline Help: Inserting a Timestamp Into the File Name (SharePoint Channel)

    Posted 01-13-2022 15:04
    You are getting that error because filenames in share point cannot have ":"

    Try this:
    {{time.now.strftime("%Y-%m-%d %H %M %S")}}​​


    That should work, you can change the text where needed, but that should make it work



    ------------------------------
    Sean Connaughton
    ------------------------------