locked
Appending yyyymmddhhmiss to filename in adf RRS feed

  • Question

  • Hi,

    Am generating a file in adf with copy and file name should have yyyymmddhhmiss at the end like file_yyyymmddhhmiss.

    I used the following function but its throwing weird result like file_20200803098i50. Can you please check and help me to fix.

    @concat('file_',formatDateTime(utcnow(),'yyyymmddhhmiss'),'.doc')


    Porus


    Tuesday, February 4, 2020 10:00 AM

Answers

  • No its throwing error. 

    Porus

    I used the expression that I shared earlier and could see the result. I have created a variable in pipeline and using Set variable task. 


    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav

    Wednesday, February 5, 2020 11:57 AM

All replies

  • Can you try below? I haven't tested it but just doing some correction there - 

    @concat('ARAVTRAK_',formatDateTime(utcnow(),'yyyyMMddHHmmss'),'.doc')

    Below document should help - 
    https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings


    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav

    Wednesday, February 5, 2020 4:21 AM
  • No its throwing error. 

    Porus

    Wednesday, February 5, 2020 9:57 AM
  • Hi there,

    Please use the following expression :

    @concat('file_',formatDateTime(utcnow(),'yyyyMMddhhmmss'),'.doc')

    MM means month and mm means minutes. The format is case-sensitive.

    Hope this helps.

    Wednesday, February 5, 2020 11:49 AM
  • No its throwing error. 

    Porus

    I used the expression that I shared earlier and could see the result. I have created a variable in pipeline and using Set variable task. 


    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav

    Wednesday, February 5, 2020 11:57 AM
  • Hi there,

    Just wanted to check - was the above suggestion helpful to you? If yes, please consider upvoting and/or marking it as answer. This would help other community members reading this thread.
    Tuesday, February 18, 2020 7:45 AM
  • Thanks Vaibhav, its working fine. I was checking with wrong variable.

    Porus

    Wednesday, February 19, 2020 2:25 PM