How can we check the validity of the below fields coming in as string from source
Code: Select all
Timestamp --- IsValid('TIMESTAMP',InputField)
Timestamp (Microseconds)
Time
Time (Microseconds)
Moderators: chulett, rschirm, roy
Code: Select all
Timestamp --- IsValid('TIMESTAMP',InputField)
Timestamp (Microseconds)
Time
Time (Microseconds)
Code: Select all
if IsValid('Timestamp',field(DSLink.INPUT,'.',1)) and IsValid('int64',field(DSLink.INPUT,'.',2)) and len(field(DSLink.INPUT,'.',2)) <= 6 then @TRUE else @FALSE
IsValid('Time',DSLINK.INPUT)
if IsValid('Time',field(DSLink.INPUT,'.',1)) and IsValid('int64',field(DSLink.INPUT,'.',2)) and len(field(DSLink.INPUT,'.',2)) <= 6 then @TRUE else @FALSE
Code: Select all
IsValid(%typestring%,%valuestring%,[%format%])
While using the above syntax... it is not accepting format such as %mm/%dd/%yyyy %hh:%nn:%ss.6ssnegi wrote:Here I am assuming the the micro seconds are delimited from the timestamp by a '.' You can modify the field function depending on the delimiter.Code: Select all
if IsValid('Timestamp',field(DSLink.INPUT,'.',1)) and IsValid('int64',field(DSLink.INPUT,'.',2)) and len(field(DSLink.INPUT,'.',2)) <= 6 then @TRUE else @FALSE IsValid('Time',DSLINK.INPUT) if IsValid('Time',field(DSLink.INPUT,'.',1)) and IsValid('int64',field(DSLink.INPUT,'.',2)) and len(field(DSLink.INPUT,'.',2)) <= 6 then @TRUE else @FALSE
Code: Select all
sv1 :
DSLink.INPUT[7,4]:'-':DSLink.INPUT[1,2]:'-':DSLink.INPUT[4,2]:' ':field(DSLink.INPUT,' ',2)
Code: Select all
sv2 :
If IsValid('Timestamp',field(sv1,'.',1)) and IsValid('int64',field(sv1,'.',2)) and len(field(sv1,'.',2)) <= 6 then @TRUE else @FALSE