how to display dateTime to GMT format in xslt?

2019-09-05 15:28发布

问题:

I have this dateTime 2006-08-30T15:08:46.000-04:00. how to display like this 30th Aug 2006 at 19:08 GMT. thanks in advance.

回答1:

format-dateTime(
  adjust-dateTime($x, xs:dayTimeDuration('PT0H')), 
  "[D1o] [MNn,*-3] [Y0001] at [H01]:[m01] GMT")

assuming you are on XSLT 2.0.



标签: xml xslt