• Font Size
  • S
  • M
  • L

Search via FAQ No.


  • No : 30663
  • Open Date : 2019/08/23 13:46
  • Print
NEW

[DataSpider Servista] When I set the date and time data including microseconds to the script variable, the value was round off to the millisecond unit

When I set the date and time data including microseconds to the script variable using the MySQL adapter, the value was round off to the millisecond unit. Please explain the cause and a way to resolve this problem.
Category : 

Answer

Causes
 
The Java Date type that is used by DataSpider Servista handles the data with millisecond precision. For this reason, when it is converted by the Date type, the microsecond part is cut off and the millisecond part is acquired.
 
The cases converted by the Date type are as follows:
  • When a value is assigned to a script variable.
  • When the date and time data acquired by the Mapper logic is modified
  • When "Mass Data Processing" is enabled.
*In the mass data processing, the acquired date and time data are temporarily stored locally in a file. In this case, the acquired value is converted by the Date type.
 
Workaround
  • Write the acquired date and time data without any modification
The MySQL adapter can read and write the date data and time data up to microsecond. For this reason, the microsecond part will not be cut off if registering the data without any modification.
  • Treat date and time data as a string
If it is necessary to convert the date and time data or to write to a file, please obtain the microsecond value as a string.
 
For example, in Execute Select SQL, the data can be acquired as a string by executing the following query:
 
SELECT DATE_FORMAT("column",'%Y-%m-%d %H:%i:%s.%f') FROM "TABLE";
 
■Supplementary
 
Please check the help about adapters other than the MySQL adapter that supports microsecond.
 
■Reference information
 
・About the Microsecond Data