IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#33151 - 08/27/10 10:12 AM Millisecond system variable
Sue Offline
OL User

Registered: 06/24/08
Posts: 74
Loc: Massachusetts
Hi,

I was recently asked to include the milliseconds in a timestamp. I ended up just adding 6 zeroes to the timestamp but maybe millisecond could be added as a system variable that could be selected?

Thanks,
Sue

Top
#33184 - 08/31/10 09:53 AM Re: Millisecond system variable [Re: Sue]
Julio
Unregistered


Hi Sue,

The PlanetPress Suite handles time to the level of seconds and not milliseconds.

Julio

Top
#33197 - 09/01/10 11:17 AM Re: Millisecond system variable [Re: ]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Sue,

For now, PlanetPress doesn't natively support milliseconds. However, there is a workaround. You can use a JavaScript to get your timestamp, since JS supports milliseconds. For example, in Watch, you can add a Run Script action with the following script:

Code:
var OBJTime
var Hours
var Mins
var Secs
var MSecs

OBJTime = new Date()

Hours = OBJTime.getHours()
Mins = OBJTime.getMinutes()
Secs = OBJTime.getSeconds()
MSecs = OBJTime.getMilliseconds()

Watch.SetJobinfo(8,Hours + ":" + Mins + ":" + Secs + ":" + MSecs)
Watch.SetJobinfo(9,MSecs)


First, make sure that once you're in the Script Editor, go to the Language menu, and choose JavaScript. After that, the script should work. This sample code sets job info 8 to a hour:minue:second:millisecond time stamp, while setting job info 9 to the milliseconds only.

After that, you can use the job infos for the rest of your process, and call them in your Design template using &Watch.JobInfos[x], where x is the job info ID. For example, in a data selection, you can have:

=&Watch.JobInfos[8]

This would display the time stamp generated with the script.

Hope that helps!

Regards,
Raphaël Lalonde Lefebvre

Top
#33273 - 09/11/10 11:47 AM Re: Millisecond system variable [Re: Raphael Lalonde Lefebvre]
Sue Offline
OL User

Registered: 06/24/08
Posts: 74
Loc: Massachusetts
Hi Raphael,

Thank you for your reply. This will work for me.

Sue

Top