How do I format date and time on ssrs report?

前端 未结 12 2032
野的像风
野的像风 2020-12-02 18:03

on SSRS report I need to show todays date and current time

i tried this =FormatDateTime(Now,\"MM/dd/yyyy hh:mm tt\") but this is not worki

12条回答
  •  失恋的感觉
    2020-12-02 18:19

    I am using following in SSRS 2005

    =Format(Globals!ExecutionTime,"MM-dd-yyyy" & " ") 
    & CStr(Hour(Globals!ExecutionTime))  & ":"
    & CStr(Minute(Globals!ExecutionTime))
    

    Or

    =Format(Globals!ExecutionTime,"MM-dd-yyyy" & " ") 
    & Right("00" & CStr(Hour(Globals!ExecutionTime)), 2)
    & ":"
    & Right("00" & CStr(Minute(Globals!ExecutionTime)), 2)
    

    Based on comment:

    =Format(CDate(Globals!ExecutionTime), "MM-dd-yyyy hh:mm.ss") 
    

    OR

    =Format(CDate(Globals!ExecutionTime), "MM-dd-yyyy HH:mm.ss")
    

提交回复
热议问题