Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Time Formatting? Convet to text

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
User avatar
shermanpat
Posts: 122
Joined: 21 Feb 2012, 22:03
Location: SLC Ut USA

Time Formatting? Convet to text

Post by shermanpat » 08 Jul 2014, 17:25

I am trying to format some time stamps received from an API via JSON and the convert to text node doesn't seem to be able to format the date the direction i need.

The received time format look like this "2014-03-11T23:03:35.000Z" which looks to be Round-trip date/time pattern. I see in the ventuz help how to change to that format but not go from that format to a more read able format.


Can i use the convert to text node to get this reformatted?
How do I set it to local time?
Do I need to us C# to convert?

Thanks!
-Sherman
Meru Interactive

User avatar
Daniel Willer
Posts: 309
Joined: 06 Jan 2012, 18:12

Re: Time Formatting? Convet to text

Post by Daniel Willer » 10 Jul 2014, 10:16

Hi there

Unfortunately you cannot but you can use a string expression to this.
date is the string input argument.

Code: Select all

System.DateTime.Parse(date).ToLocalTime().ToString("mm:ss")

User avatar
shermanpat
Posts: 122
Joined: 21 Feb 2012, 22:03
Location: SLC Ut USA

Re: Time Formatting? Convet to text

Post by shermanpat » 10 Jul 2014, 19:32

Thank you, works great.

I ended up using this to get the full date to output date format I wanted.

Code: Select all

System.DateTime.Parse(A).ToLocalTime().ToString("U")
-Sherman
Meru Interactive

Post Reply