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. anything
  2. how to post miro for zero grn value
  3. iphone 4 does not regonizes sim card
  4. illustrator cs3 initialization crash
  5. nokia 6120c (B20.04) way
  6. segment e1idku4
  7. BExGetData
  8. fb02 auth objects
  9. sap po update ekpo upon save
  10. does STATUS_CHANGE_EXTERN COMMIT WORK
Copyrights 2019 Fcffair BigData Resource, All rights reserved