Crystal Report 处理当前系统时间

时间:2022-04-06 15:08:19

Changed the print date format to HH/yy/MM/mm/SS/dd  (For Example:2014/01/23 16:30:45= 161430014523) :

iif(Hour(CurrentTime)<,left(''+totext(Hour(CurrentTime)),),left(totext(Hour(CurrentTime)),))+
right(left(totext((Year(CurrentDate))),),)+ iif(Minute(CurrentTime)<,left(''+totext(Minute(CurrentTime)),),left(totext(Minute(CurrentTime)),))+
iif(Month(CurrentDate)<,left(''+totext(Month(CurrentDate)),),left(totext(Month(CurrentDate)),))+ iif(Second(CurrentTime)<,left(''+totext(Second(CurrentTime)),),left(totext(Second(CurrentTime)),))+
iif(Day(CurrentDate)<,left(''+totext(Day(CurrentDate)),),left(totext(Day(CurrentDate)),))

或者:

totext(Hour (PrintTime),"") + mid(totext(Year (PrintDate),""),,)+ totext(Minute (PrintTime),"") + totext(Month (PrintDate),"") + totext(Second (PrintTime),"") + totext(Day (PrintDate),"")