如何在Crystal报表中将Date转换为DateTime

时间:2015-02-06 11:59:30

标签: c# crystal-reports

如何在水晶报表中将Date转换为DateTime

这是公式:请帮助我:(

if isnull({Command.DepartureDate}) then DateTime(0,0,0)

else

if ({Command.DepartureDate}='') THEN Date(0,0,0) 

ELSE 

Date(ToNumber(LEFT({Command.DepartureDate}, 4)),
      ToNumber(Mid ({Command.DepartureDate}, 6, 2)),
      ToNumber(Mid ({Command.DepartureDate}, 9, 2))
     )

0 个答案:

没有答案