Conversion of Date in Scriptcode #659
Replies: 2 comments
-
Hi @DanielGerlach2,
Yes, you want the Using ScriptEngine As New VBScriptEngine(WindowsScriptEngineFlags.EnableDebugging Or WindowsScriptEngineFlags.MarshalDateTimeAsDate) Good luck! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Works, Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As you stated under Question about marshalling of certain type:
it provides automatic conversion of fundamental data types only – numbers, strings, Booleans, etc. – and optional automatic conversion of nontrivial but commonly used data types such as date-times and tasks/promises.
I have a use case where a VB.NET Date-Param is passed to the script.
So far (using MSScriptControl), an implicit conversion worked without problems.
The line
s = replace( s, ""{@ReferenceDateFrom}"", DateFrom )
causes a type-conflict.I've also tried adding the date using AddHostType, but to no avail.
Is there a setting I've forgotten?
Beta Was this translation helpful? Give feedback.
All reactions