Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Problems using Time2Num() to create unique identifier

Level 1
Level 1

I am a casual user of LiveCycle (v8.0) and am trying to create a field that will generate a unique value using the Time2Num function, calculating from the time the form is opened.  I found some code online, but can only get it to work when the time is hard coded (below).  The field type is Date/Time.  I was trying to insert 'Time()' in place of the "13:13:13" with the same format, different formats, no format, but the field only shows a zero when opened.  Not sure if I'm using the wrong field type, code, or both?


<event activity="ready" ref="$layout">


if ($.rawValue == null) then

$.rawValue = Time2Num("13:13:13", "HH:MM:SS")




0 Replies
Level 10
Level 10

You do not need aconversion. You can directly use the Time() function..

if ($.rawValue == null) then
$.rawValue = Time();