Service Manager / Service Center Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

get the time of date/time field using javascript

Regular Advisor

get the time of date/time field using javascript

Hi Guys,

 

just a question.

if I have this date/time field 20/01/14 13:15:00... how can I retrieve the time from that field?

 

Thanks

4 REPLIES
Honored Contributor Honored Contributor

Re: get the time of date/time field using javascript

Hello,

there is a script portion (on Forums) which can change the date/time from JS to SM format.

 

What is exactly your task? 

Highlighted
Honored Contributor Honored Contributor

Re: get the time of date/time field using javascript

try function,

getISOTime()

like, field.getISOTime()

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
Regular Advisor

Re: get the time of date/time field using javascript

Hi Vadim, Piku,

Thank you for your replies.
What I am trying to do is the following:
We want to have a CAB Matrix. When the Total number is >20, then the change should go automatically to CAB.
We have different fields. Based on the selection a number is generated.
For a specific field, based on the Planned start, if the change is planned after 5 PM then it will take a value off-peak =1
if it's between 8 and 4 pm than it will take peak=4
Honored Contributor Honored Contributor

Re: get the time of date/time field using javascript

Did you tried above function?
Could not exact requirement.

also this can be done by RAD expression like,
update :
if (time(peak in $file) > '16:00:00' and time(peak in $file) < '20:00:00')
calculation :
peak in $file = date(peak in $file) + '16:00:00'

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.