Service Desk Practitioners Forum
cancel

sd_event duration field import format

SOLVED
Go to solution
Highlighted
De Naeyer Robby
Trusted Contributor.

sd_event duration field import format

Hi,

I am trying to populate a duration field thru sd_event.
Can anyone tell me what format to use in my command.
I thought it would be something like "2:20" but that does not seem to work.
And straingly when I use "2hours 12minutes" it fills in 48 hours.

Best regards,
Robby De Naeyer.
4 REPLIES
Vasily Kamenev
Acclaimed Contributor.
Solution

Re: sd_event duration field import format

HI
I'm not sure, but possible variants:
(1/24)*2+1/(24*60)*12=0.09167
or
2.12

Vasily
Ivan Sakharov
Honored Contributor.

Re: sd_event duration field import format

Hi
SD store duration time fields in decimal format. 1.00000 is 24 hours so 4 hours for example is 0.16667. In your case try to use sd_event with parameter 0.09583333 (2.3 hours)
De Naeyer Robby
Trusted Contributor.

Re: sd_event duration field import format

Thanks,

Indeed the calculation is as mentioned:
(1/24)*[HOURS]+(1/(24*60))*[MINUTES]

And should be inported with a "." as decimal seperator.

Best regards,
Robby De Naeyer.
De Naeyer Robby
Trusted Contributor.

Re: sd_event duration field import format

Excellent solution, thanks for your input.