Time Variable Default value

  
hi all,
I have a local variable of Time datatype in one of my function. I want to assign default variable to this variable as "9.00". How Can we achieve this .
It might be a simple question as I am new to this platform.
Please help.
Thanks




Hi Tejas,

Welcome to the platform! Immediate values of a Date, DateTime or Time variable should be placed between hashes. For a Time variable, the format is #hh:mm:ss#. So in your case, enter #09:00:00#.
Thanks Kilian for the reply. That helps.

Is it possible to just show the hours and minutes only? e.g. 09:00 ? Tried using the format #00\:00# it is not allowed

Hi Boney,

This question was about setting a default value, not about displaying. If you want to display a time without the seconds, simply do a SubStr(TimeToText(timeVar), 0, 5).

Boney Sze wrote:

Is it possible to just show the hours and minutes only? e.g. 09:00 ? Tried using the format #00\:00# it is not allowed

Hi Boney,

You can use this extension http://www.outsystems.com/forge/component_details.aspx?ProjectId=67  to format date time in any format you want. And here is a reference on how to use it: https://www.outsystems.com/forums/discussion/3705/new-feature-in-extension-text-to-format-date-time-expressions/


In OutSystems 10 there is already a format builtin that allows you to do that.


Regards,
João Rosado