Support Forums
String manipulation

Hi

I have a date and time string 180713 0830. I must logging this string in format 13.07.18 08:30. How can I do this? At the moment I can separate it to 1$=18 2$=07 3$=13 4$=08 5$=30, but how can I merge it together? Is it possible?

Fork

Hi I have a date and time string 180713 0830. I must logging this string in format 13.07.18 08:30. How can I do this? At the moment I can separate it to 1$=18 2$=07 3$=13 4$=08 5$=30, but how can I merge it together? Is it possible? Fork

Hi Fork,

You can capture the information either using string variable (n$) or channel variable (nCV).
Either way there is no direct method to achieve your requirement.

You may use string manipulation via host port which I discuss in the previous topic.
Basically you make a loop of sending and receiving string on the same port.

Or you can construct that date information via alarm text.
So rather than logging it as data you can log it as alarm (please make sure you use a number after ALARM syntax (i.e.: ALARM1"?1$.?2$...) to trigger a logging process.
And make sure when you do a data transfer the option "alarm=yes" must be included.

Best regards,
Rudy Gunawan

Hi Fork, You can capture the information either using string variable (n$) or channel variable (nCV). Either way there is no direct method to achieve your requirement. You may use string manipulation via host port which I discuss in the previous topic. Basically you make a loop of sending and receiving string on the same port. Or you can construct that date information via alarm text. So rather than logging it as data you can log it as alarm (please make sure you use a number after ALARM syntax (i.e.: ALARM1"?1$.?2$...) to trigger a logging process. And make sure when you do a data transfer the option "alarm=yes" must be included. Best regards, Rudy Gunawan

Hi Rudy,

thanks for your answer. I will try it via alarms (using of Hostport is not possibly in this project) and thanks for the hint alarm=yes.

Fork

Hi Rudy, thanks for your answer. I will try it via alarms (using of Hostport is not possibly in this project) and thanks for the hint alarm=yes. Fork
19
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft