Hi,
How to add 6 hours in time format ? 10:17 ====>this is my time how to add 6 hrs in this format
Thanks in advance
Hi,
How to add 6 hours in time format ? 10:17 ====>this is my time how to add 6 hrs in this format
Thanks in advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Mar 16, 2023, 4:16 AM
Hello Vinoth,
In angular, you can do like following:
Thanks
Naimish Makwana
Hiten PingoliaPosted Mar 15, 2023, 12:00 PM
JavaScript using the
Dateobject and itssetHours()method.Tuhin PaulPosted Mar 15, 2023, 11:04 AM
Hello Kumar,
To add 6 hours to a given time in the format of "hh:mm", you can use the following steps:
1. Convert the time string to a DateTime object in C#.
2. Add 6 hours to the DateTime object using the AddHours() method.
3. Convert the DateTime object back to a string in the original format.
The final code would look like this:
This will output the new time with 6 hours added in the format of "hh:mm". In this case, the output will be "16:17".
Vishal JoshiPosted Mar 15, 2023, 10:17 AM
Hello Vinot
Please check the below code to add hours in time.
Thanks
Vishal