I have it set for Options hhmmss and placed into a variable.
I then pass this variable into an include project and all works fine and uses this variable correctly.
I then pass this into Execute Program, it launches and all is correct as it uses the right format.
The issue I have is in the FBCMD mode. The include project works fine. but ehe Execute Program reads in the variable into its variable. After it is executed to be used in the projects if there are any leading 0's they are removed.
For Example
Time: Variable GUI MODE DOS Mode
00:10:20 001020 001020 1020
01:10:20 011020 011020 1020
13:10:20 131020 131020 1020
Note 3 different times but in dos mode they would look like it is the same.
I even tried to copy the variable to a new variable and bring it in as a String, to be passed in and it came with the same results.
This is a limitation with FB6 and earlier, variables are Variant’s and the Variant Implementation will tend to treat numbers with leanding zeros as integers. This is something that was addressed in FB7, where variables can be typed as String, Integer, Boolean, DateTime.
The work around in FB6 is to double quote the value on the command line, and then use the Set Variable Action to Strip the quotes and force the variable type to string.
Thanks, I will evaluate this work around as well as another, knowing that leading “0”'s are removed, I can add them back as I know the length of the variable. Interesting to see that in the GUI mode it worked fine.