Remove Seconds

  

Hi, 

How can i remove seconds from DateTime?

Example:
2017-09-09 12:00:02 to 2017-09-09 12:00

Thank You.

Hi Marcio,

You can use the below function.

FormatDateTime(CurrDateTime(),"yyyy-MM-dd hh:mm")


Shashank...

Hi Marcio,

If it's just to display it, you can use FormatDateTime as Shashank has suggested.

If it's to change the date to have a Datetime variable with the seconds equal to zero you can use:

NewDateTime(Year(date),Month(date),Day(date),Hour(date),Minutes(date),0)

or

AddSeconds(date,-Seconds(date))

Cheers,

José

Shashank Diwan wrote:

Hi Marcio,

You can use the below function.

FormatDateTime(CurrDateTime(),"yyyy-MM-dd hh:mm")


Shashank...

Thank you for your reply.

Im using Outsystems 8 and i only have function FormatFullDateTime.

Thanks.


Solution

Marcio,

You could just use a Substr to cut off the last three characters?

Solution

Kilian Hekhuis wrote:

Marcio,

You could just use a Substr to cut off the last three characters?


Thank You...

That solve the problem.