date formatting (385 Views)
Reply
Occasional Visitor
SivaChandu
Posts: 1
Registered: ‎10-13-2013
Message 1 of 2 (385 Views)

date formatting

We are using HPSM 9.30 version in client location.We are going to deliver HPSM 9.30 Email Solution as per the custoemr requirement..Stuck with a problem....

 

 

1) Reported Date format field having the value “$RECORD.downtime_start”. Means from the Current record we are getting that Value. The value in the current record is 08/10/13 00:38:09.But when it coming into the Email it is coming as Tue Oct 08 2013 00:38:08 GMT+0530 (India Standard Time).

So we want in the format (Example : 03/10/2013 12:01:09 AM).

 

 

downtime_start is the database field name..$RECORD is current record in HPSM....

 

In Expression Part after downlaoding Unl i found this info..But now how to change this value 13/10/13 20:35:07....

 

var timestring = "";
var timezone = "";
if(system.vars.$G_pm_global_environment.exit)
{
  timestring = system.vars.$lo_time_zone;
  timezone = timestring;
}


if(timestring) timestring = timestring +" ";


timestringtimestringtimestring = timestring +system.functions.str(system.functions.tod()) + ":";

 

 

tod() function has to change the value to 13/10/13 20:35:07...

 

Can you please help me on this ........

 

 

 

Please use plain text.
HP Expert
viprom
Posts: 321
Registered: ‎11-09-2011
Message 2 of 2 (344 Views)

Re: date formatting

Hi,

 

check this doc out http://blog.stevenlevithan.com/archives/date-time-format

it may give you an idea.

-----
If you find this or other posts helpful, please do not forget to click the Kudo Star or to mark it as a Solution if you are the owner of the thread. Thanks :)
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation