How to add two minutes to current time

PFA,
image

I want to extract this time value & add two minutes to existing time

Can anyone guide me

Thanks in advance

Hi @rsr.chandu

Try this

DateTime=DateAndTime.Now.AddMinutes(2).ToString(“HH:mm”)

I hope it helps!!

image

I need only hours& minutes

@rsr.chandu

You can try this

DateTime.ParseExact("9:41 AM", "h:m tt", System.Globalization.CultureInfo.InvariantCulture).AddMinutes(2).ToString("h:m tt")

Or for current
now.addminutes(2).ToString("h:m tt")

In place of 9:41 AM you can use any time you need

Cheers

@rsr.chandu

DateTime.Now.ToString(“HH:mm”)

@rsr.chandu

DateTime.Now.ToString.Split(" ")(1)

Regards

Hi @rsr.chandu

Use the below expression to get only hrs and minutes

- Assign -> Variable = DateTime.Now.toString("HH:mm")

Add two minutes to it

Hope it helps!!

@rsr.chandu

Try this it will add 2minutes to current time and the output will be in Hours & minutes.

DateTime.Now.AddMinutes(2).ToString("HH:mm")

Regards

@rsr.chandu

System.DateTime.Now.ToString(“HH:mm”)

@rsr.chandu

How about this

Date=DateAndTime.Now.AddMinutes(2).ToString("HH:mm")

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.