2010-10-07 93 views

回答

5

你需要fn:format-dateTime

我觉得应该是:

format-dateTime(current-dateTime(), 
       '[FNn,*-3], [D01] [MNn,*-3] [Y0001] [H01]:[m01]:[s01] [Z]', 
       'en', 
       '', 
       'US') 

现在,对我来说,输出:

Thu, 07 Oct 2010 21:10:03 -03:00 
2

是啊。我加入 'AD' 作为日历和清理使用SaxonHE 9.3.0.5

fn:format-dateTime(current-dateTime(), 
      '[FNn,*-3], [D01] [MNn,*-3] [Y0001] [H01]:[m01]:[s01] [Z]', 
      'en', 
      'AD', 
      'US') 
0

在XSL输出:

<xsl:value-of select="concat(ms:format-date(InputDate, 'ddd, dd MMM yyyy'), ' ', ms:format-time(InputDate, 'HH:mm:ss'), ' EST')"/> 

当日期从数据库中检索为:

SELECT 
     Table.DateField AS InputDate 
    FROM Table 

或尝试: SELECT CONVERT(NVARCHAR(10),Table.DateField,101)AS InputDate FROM Table