Hey all,
I want to subtract the Time i.e 15 min from the current date time.but I don’t know how to do it .
Can anyone pls help me.
Thanks,
Hey all,
I want to subtract the Time i.e 15 min from the current date time.but I don’t know how to do it .
Can anyone pls help me.
Thanks,
hi buddy @Nidhi2
There are many methods that are readily available with datetime class like this
**AddDays(number in integer) **
AddMonths(number in integer)
AddHours(number in integer)
AddMinutes(number in integer)
AddSeconds(number in integer)
AddTicks(number in integer) and many more…
–all these methods will take integer as argument (number in integer), and you can even pass the numbers in negative that would subtract the number of days.
So to get the current date and time we use, Datetime.Now and to subtract 15 mins from it, from one of the mentioned above methods of Datetime, we use AddMinutes()
like this
Datetime.Now.AddMInutes(-15)
–This will subtract 15 minutes from the current time…buddy
For more info on methods available like this in Datetime class in C#, kindly have a view on this that could help you in future as well
Cheers @Nidhi2
thanks @Palaniyappan @lakshman.
can you please help me in another problem.
I have an table in which unstructured data exist…
I have tried all the activity to extract that data .but It doesnot work .It gives me blank message box.
Please help how to extract the unstructured data…
try with generate datatable Activity buddy
Did that work
Cheers @Nidhi2
thanks @Palaniyappan
but It didn’t work…
hey @AshwinS2
Yes I have tried it also…
Could you please take screenshot of that data and show me. So that I can help you better in this.
Fine buddy
May i know where does this unstructured data exists…do you have that as a string variable or it is still to be extracted from a window or a browser
Cheers @Nidhi2
Hey, I want to subtract time that i retrieve from emails and stored in excel under date column with current time and if the difference is more then 2 hours i want to do some task, so in if activity i am not able to subtract two dates and if activity is itself in for each row activity, ols help