Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi colleagues.
I have string field with time stamp and some text.
For example:
21/06/2018 2:17: 6718 call Step_11 |
21/06/2018 2:59: 2461 call Step_12 |
21/06/2018 2:59: 2463 CALL Step1 |
21/06/2018 2:59: 6502 call Step_22 |
21/06/2018 2:59: 6503 call Step_23 |
21/06/2018 2:59: 6504 call Step_23 |
21/06/2018 3:00: 2464 CALL Step2 |
I what get timestamp, but don't wan't use Left() function, or something like that. I want use only timestamp#() if it possible.
Can you help me?
Awesome, please close the thread if you got what you wanted.
Best,
Sunny
TimeStamp and Text are in the same column or are they two different columns?
All In one column.
In that case, you need to separate out TimeStamp from the whole string before you can use TimeStamp#() function. You didn't want to use Left() function, but how about SubField to separate text from timestamp?
I will try.
I thought we can use timestamp# with format like 'MM/DD/YYYY hh:mm####' to cut redundant text.
I don't think that is possible (atleast based on my understand)... you can help interpret an exact timestamp (not read as timestamp), but it cannot remove any untended text.
This works... if you are okay with using SubField
Table:
LOAD *,
TimeStamp(TimeStamp#(SubField(FieldName, ' ', 1), 'DD/MM/YYYY h:mm: ffff')) as TimeStamp;
LOAD * INLINE [
FieldName
21/06/2018 2:17: 6718 call Step_11
21/06/2018 2:59: 2461 call Step_12
21/06/2018 2:59: 2463 CALL Step1
21/06/2018 2:59: 6502 call Step_22
21/06/2018 2:59: 6503 call Step_23
21/06/2018 2:59: 6504 call Step_23
21/06/2018 3:00: 2464 CALL Step2
];
Yes it works, thank you.
Awesome, please close the thread if you got what you wanted.
Best,
Sunny