Announcements
I am trying to extract the Year number from a given date
I use the Get Current Date and Time action and store the result in CurrentDate
I then run this VB Script but get an error saying ')' expected
Why am I getting an error ?
Hello,
You can try this:
Thanks and hope it can help you.
Mike
---------------------------------
Did I answer your question? Please consider to Mark my post as a solution! to guide others
Thanks !
So the input to VBScript should be a text datatype and not a datetime datatype.
Yes,
And you should have a double quote inside Year function as well.
Hi @GanCW @miketran13
for this problem statement I think the VB script is not required, it can be achieved as below too:
Agree. This was more on trying to understand the interface to VBScript. Didn’t know the interface has to be text.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
David_MA 298 Super User 2026 Season 2
11manish 150 Super User 2026 Season 2
trice602 147 Super User 2026 Season 2