6/23/2011 10:06 AM | |
Posts: 148 Rating: (14) |
It is easy you missing the function Cstr that convert number to string So your code
Should be : [code]Dim Test Set Test = HMIRuntime.Tags("YEAR") If ScreenItems("COMBO").Seltext = "JANUARY" Then HMIRuntime.Tags("FromTag").Write Cstr(Test) & "-01-01" HMIRuntime.Tags("ToTag").Write Cstr(Test) & "-01-31" End If[/code] and make it easy [code]If ScreenItems("COMBO").Seltext = "JANUARY" Then SmartTags("FromTag") = Cstr(SmartTags("YEAR")) + "-01-01" SmartTags("ToTag") = Cstr(SmartTags("YEAR")) + "-01-31" End If[/code] |
Last edited by: AmirAlwaled at: 6/23/2011 10:08 AMspelling correct |
|
6/23/2011 10:33 AM | |
Joined: 7/28/2009 Last visit: 5/10/2022 Posts: 90 Rating: (7) |
Hi AmirAlwaled This script do not seem to work. I have tried both of them. . Please Help. Regards Revathy |
Cheers |
|
6/23/2011 5:23 PM | |
Posts: 148 Rating: (14) |
Oh it's my fault it is WinCC forum not flex forum I made the code in flex editor Sure that you don't need any " Cstr " in the code because year is unsigned integer |
Follow us on