|
Bluepoint Design |
![]() |
| Practical Cost-Effective Solutions | |
| Text to Serial Time VBS |
|
|
|
I wrote
an enormously complex macro
to mathematically convert a date string to a time variable in MEP Script
once but now I have found a simpler way using VBScript and the External
Script command. Here's an example of the code to put into External
Script:
Yep, that's all there is to the script, one line. This will return a string variable to the variable you specify in the "Save console output to:". Now convert the string to decimal with Variable Modify String and finally convert that to time using Convert Decimal to Date/Time. The command uses the double data type so it also supports time accurately. EG "8/19/1968 12:15 PM" returns "25069.5104166667". If you would like to get real tricky you could use the IsDate function to handle strings that are not dates. In the example below it will return the string "Bad" which you can test for back in MEP.
Notes:
|
|
|
|
|
||
| Practical Cost-Effective Solutions | |||