TimeToSrl function is working

edited 2:01PM in FastReport VCL
Why if I put this code [TimeToStr(600)] in the TfrxMemoView instead of getting '00:10:00' I see '00:00:00 ' ?
I'm wrong or it's a bug ?

Comments

  • PolomintPolomint Australia
    edited June 2019
    Enko wrote: »
    TimeToStr(600)

    I see 00:00:00
    I don't have access right now, but I suspect TimeToStr takes a TDateTime parameter **. So you are passing a parameter with the time element set to zero (and the date 600 days after 30/12/1899).

    To pass a time you would need the parameter to contain a fractional amount (e.g. 43,620.0069444444 for ten minutes after midnight today.)

    Cheers, Paul


    ** Confirmed!

    BTW, the fractional amount is your time in minutes divided by the number of minutes per day [ i.e. 10 / (24*60) ].

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.