Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Elapsed Days between Two Date Fields

$
0
0

I have two date/time objects that record the current time and date when a button is clicked (two different buttons, one for each date/time object). I would like to calculate the elapsed days in another field. Ideally it would calculate the elapsed days, hours and minutes.

 

I have tried for hours to figure this out. I can make it work when it is just two dates without the time. I found using Date2Num and FormCalc I can get the elapsed number of days. Is it possible to get the elapsed number of days, hours and minutes?

 

All of the date/time expressions I try do not work and I can't find additional examples. Currently my date and time is formated this way but can be changed if needed:

 

TimeStampToFT.rawValue = Concat(Num2Date(date(), "EEE M/D/YYYY "), Num2Time(time(), "h:MM A"))

 

and displays like this:  Tue 3/5/2013 10:33 AM

 

I unsuccessfully tried to get just the date to convert to a number using this script: (FormCalc and Textfield)

 

this.rawValue = Date2Num(DateField1.formattedValue, "EEE M/D/YYYY")

 

Help with this would be appreciated.


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>