BusinessObjects Board

Converting date to seconds

Hi All,

Is there a way to convert date-MM/DD/YYYY to seconds?

Origenate date, seconds1, Requested Date, seconds2 all these are different objects.

What I need is difference of seconds between to dates.

(Origenate DATE(MM/DD/YYY) SECONDS1(HH:MI:SS))-(Requested DATE(MM/DD/YYY) SECONDS2(HH:MI:SS))

So first part and second part both gives seconds. Substraction gives the result.

Even the way to convert MM/DD/YYYY to seconds is fine for me.

thanks
Sky

thanks for your help.


Sky :india: (BOB member since 2005-08-04)

Look at

Mick


mikca :australia: (BOB member since 2005-12-16)

here you need to create the following Variables.

HoursCalc :

=Abs( ( ToNumber( FormatDate(<Date1> ,"HH") )) - ToNumber( FormatDate(<Date2> ,"HH")))

MinutesCalc :

= Abs(ToNumber( SubStr(FormatDate(<Date1> ,"HH:mm") ,4 ,2) ) - ToNumber( SubStr(FormatDate(<Date2> ,"HH:mm") ,4 ,2)))

DaysCalc :

DaysBetween(Date1,Date2)

TotalSeconds :

=<DaysCalc>*24*60*60+<HoursCalc>*60*60+<MinutesCalc>*60

Stephen123 (BOB member since 2007-01-23)