These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Time Format

wdrspens
Registered: Jul 22 2008
Posts: 94
Answered

I have a very useful little Java snippet that prints the time a document is printed in a field I have placed at the foot of the document.
The code is :
this.rawValue="Printed on "+util.printd("dd-mmm-yyyy, hh:M tt",new Date());

However that prints the time in the 12 hour clock format with minutes under 10 being 4 instead of 04 (as an example). What code do I use to print the time in the 24 hour format?

Many thanks

David

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
Change the date format to "dd-mmm-yyyy, HH:MM". This is all documented in the JS API Reference.

George Kaiser

wdrspens
Registered: Jul 22 2008
Posts: 94
Thank you very much

I cannot find my way around, or understand the JS API Reference, despite my best endeavours. I do not understand the structure of the document. I will first have to find some tuition.

Many thanks

David