• Font Size
  • S
  • M
  • L

Search via FAQ No.


  • No : 30558
  • Open Date : 2019/09/05 16:02
  • Print
NEW

[DataSpider Servista] We are planning to manage output files by date and time. Can I combine the file name with a timestamp and output it?

We are thinking of managing output files by date and time. Is it possible to output a combination of the time stamp in the file name?
Category : 

Answer

You can combine timestamps to file names by using the script variable.

Before the operation of outputting the file (such as writing to a CSV file), you need to assign a timestamp to a script variable, and output a file name as such as "test file name _ script variable name.csv”.

  1. Use the [Current date and time icon] icon to obtain the current date and time.
  2. Convert the current date and time obtained in step 1 into an hour, minute, and second format string using the [Date and time formatting] icon.
  3. Store the string acquired in step 2 in a script variable.
  4. Use the script variable for [File name] such as CSV file write processing to output.

  Setting the [Date and time formatting] icon
   Format: Specify the format for converting date and time to a string.
        Example: 
           In the case of "hours, minutes and seconds" HHmmss
           In the case of "hour: minute: second" HH: mm: ss

Please refer to the following DataSpider Servista help for details about the [Current Date and Time] logic and the [Date and Time Formatting] logic.

  • [Mapper]-[Mapper Logic Guide]-[Date]-[Current Date / Time Icon]

URL:https://www.hulft.com/help/en-us/DataSpider/dss42sp2/help/en/mapper/merge/logic/now.html

  • [Mapper]-[Mapper Logic Guide]-[String]-[Date and time formatting]

URL:https://www.hulft.com/help/en-us/DataSpider/dss42sp2/help/en/mapper/merge/logic/iso8601ToCustom.html

 
Version Information
Ver.4.1、Ver.4.0、Ver.3.2