contact  |  about  |  sitemap

Convert time
Last Post 02 Apr 2010 10:26 AM by Jim. 6 Replies.
Sort:
PrevPrev NextNext
Author Messages
Jim

--
28 Mar 2010 01:49 PM
Hi

I've been trying to find the most efficient way to convert from one time format to another. Example, I want to convert 569 min 227 sec to hh:mm:ss. Is there a quick easy way to do this?


Tijn

--
31 Mar 2010 03:35 PM
The new date time action in Djuggler 3.2.1 should do the trick.

See the attached example.
Tijn

addtotimeexample.djs

Jim

--
31 Mar 2010 11:28 PM
Thanks for the reply Tjin.Unfortunately I made a mistake in the post - the actual times are supposed to be seconds/milliseconds - so the example should have been:
569 sec 227 milliseconds. It seems the datetime actions may not work with this...is this so?


Tijn

--
01 Apr 2010 01:15 PM
The add to date time does not support milliseconds.
The format action however does: hh:mm:ss:zzz

I think you have to use the Math action in the variables section and make your own calculation for the milliseconds.


Tom

--
02 Apr 2010 01:18 AM
Thanks for the reply Tjin.

If I separate out the second from the millisecond, in the example= 569 sec and then divide by 86400 I then get a number (0.0065856), which if formatted in Excel as hh:mm:ss will give me the what I known is the correct number: 0:09:29.

However I have not been able to do this in djuggler with the date format action - I always get 00:00:00. Unfortunately, as my maths are very basic, I would very much appreciate some help. Thanks.


Support Team

--
02 Apr 2010 09:26 AM
@Jim:

Unfortunately you are right. Currently, milliseconds can not be added or set in a DateTime var. That means you can't work with or display milliseconds in a datetime var. You could probably circumvent the whole issue by using Number variables for each unit (seconds, msecs, mins), but that will take quite a few script lines.

We will expand the DateTime actions in the next release of Djuggler. The DateTime actions will then support milliseconds as well.

Support Team


Jim

--
02 Apr 2010 10:26 AM
Thanks for the quick response Support Team. I look forward to the addition. Will you also include conversion from decimal time to standard time?




Quick Reply
toggle
  Username:
Subject:
Body:
Security Code:
Enter the code shown above:

Submit

Powered by Active Forums

Forum participation and optional registration

You don't need to be registered to partcipate in the Djuggler forums, however if you want to subscribe to email notifications you need to register. You can also subscribe to the forum RSS feed.