Display current time in report

Hi all,

In report, using systemdateget(), we can get the system date. How to display current time in report. I used timenow() as int basetype but it is not working…Plz help


The timenow() function gives the seconds ,just convert it into hours then you will get current time;


The function timeNow() retrieves the current system time. The time is returned as the number of seconds that have elapsed since midnight.

int timeNow()

You can use time2Str Function alongwith the timenow() function to display the current time in the report as a string in a desired format . time2str function converts a time specified as the number of seconds elapsed since midnight to a text string that includes hours, minutes, and seconds.

str time2Str( int _time, int _separator, int _timeFormat)

The parameters of the function time2Str are described as below:

_time: The number of seconds since midnight.

_separator: The characters to be used as separators in the text string. Possible values follow:

  • 0 – regional settings for the operating system

  • 1 – colon (:slight_smile:

  • 2 – point (.)

  • 3 – space ( )

  • 4 – comma (,)

  • 5 – forward slash (/)

_timeFormat: Determines whether a 12-hour or 24-hour clock is used. Possible values follow:

  • 0 – regional settings for the operating system

  • 1 – 24-hour clock (15:00:00)

  • 2 – 12-hour clock (3:00:00pm)


You can get current date time based on time zone like this -

info (strfmt(‘Date %1’, DateTimeUtil::newDateTime(systemdateget(), timenow(),Timezone::GMT_DUBLIN_EDINBURGH_LISBON_LONDON)));


Just type time in SourceExpr of textbox properties and when u run the report it will print current time.