0
XSLT 2.0XSLT 2.0格式的currentdate
我的xsd:日期時間字段,而我必須分配當前日期時間格式化爲
[D01]-[M01]-[Y0001] [h01]:[m01]:[s01] and using the below function
format-dateTime(current-dateTime(), '[D01]-[M01]-[Y0001] [h01]:[m01]:[s01]')
我能夠上面的輸出分配到的xsd:字符串元素,而不是xsd:datetime元素。我甚至嘗試類型轉換一樣xsd:dateTime(format-dateTime(current-dateTime(), '[D01]-[M01]-[Y0001] [h01]:[m01]:[s01]'))
的但沒有任何工程。任何建議將是有益
你究竟在做什麼?如果您想將該值作爲日期/時間對象進行操作,則不要對其進行格式化。一旦你格式化了它,它只是一個字符串。 –