How convert date/time from xml in xdp(Designer)?

Advertisement
October 11

Hi, i want to convert date/time format from xml in Designer, date/time value in xml is NOT in common format YYYY-MM-DD (if is in a common format i can do this with pattern)
I have a "DateTime" Field in Xdp can get from Xml date and time:
In XML <DateTime>DD-MM-YYYY</DateTime> i want to convert in XDP in DateTime Field in "DD-April-YYYY"
Can i do this?

Advertisement

Replay

You can do this way..
Bind the date field to your XML tag.
Set the display pattern for the date field.
In the initialize event of the date field place the following code.
Set JavaScript as language.
var dtStr = this.rawValue;
var pos1=dtStr.indexOf("-");
var pos2=dtStr.indexOf("-",pos1+1);
var strMonth=dtStr.substring(0,pos1);
var strDay=dtStr.substring(pos1+1,pos2);
var strYear=dtStr.substring(pos2+1);
//Assign the formatted value to the Date field.
this.rawValue = strYear + "-" + strMonth + "-" + strDay;
Thanks
Srini

View 3 Replies

Tags:

  1. pubsubagent making cpu run at 100
  2. oracle r12 payable aging report gl date
  3. in report manager scroll issues in ssrs
  4. does STATUS_CHANGE_EXTERN COMMIT WORK
  5. uccx editor java.long error
  6. itunes download 10.5
  7. privatejqw
  8. protectionb1d
  9. attemptzvw
  10. TH8D
Copyrights 2019 Fcffair BigData Resource, All rights reserved