What's the use of setNumericValue() ?

Archana Singh1
Tera Expert

Hello,

I was working on a form where we were using metric_instance table.In the Script Include setNumericValue() method was being used.I wish to know when do we use setNumericValue() and what's the unit in which we get the output for this method.

Thanks in advance.

@

Regards,

Archana

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

Hi Archana,



Check the below details.


3.42 setNumericValue(milliseconds)

Sets the date and time to the number of milliseconds since January 1, 1970 00:00:00 GMT.


3.42.1 Input Fields

Parameters:


  • milliseconds - (int) The number of milliseconds.

3.42.2 Output Fields

Returns: void


3.42.3 Example

var gdt = new GlideDateTime(); 
gdt.setNumericValue(1314777600000);
gs.print(gdt.getValue());

Output:


*** Script: 2011-08-31 08:00:00



Thanks,


Harshvardhan


View solution in original post

1 REPLY 1

Harsh Vardhan
Giga Patron

Hi Archana,



Check the below details.


3.42 setNumericValue(milliseconds)

Sets the date and time to the number of milliseconds since January 1, 1970 00:00:00 GMT.


3.42.1 Input Fields

Parameters:


  • milliseconds - (int) The number of milliseconds.

3.42.2 Output Fields

Returns: void


3.42.3 Example

var gdt = new GlideDateTime(); 
gdt.setNumericValue(1314777600000);
gs.print(gdt.getValue());

Output:


*** Script: 2011-08-31 08:00:00



Thanks,


Harshvardhan