We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

problem with DateAdd method

Hi i need to add minutes to the current time and i have written the following code. But this is not working. Where is the mistake? Please help

Dim exp_time as datetime

Dim IntervalType as DateInterval

IntervalType=DateInterval.Minute

exp_time=current

newtime=CDate(exp_time)

DateAdd(IntervalType, delay, newtime)



1 Reply

PJ Poornima Joy Balan Syncfusion Team May 7, 2007 10:41 AM UTC

Hello,

Here is the code of a example. I hope it will help it out.

Dim exp_time, newtime As DateTime
Dim delay As Double
Dim IntervalType As DateInterval
IntervalType = DateInterval.Minute
exp_time = DateTime.Now()
delay = 7
DateAdd(IntervalType, delay, exp_time)

Please let us know if you have any further queries.

Thanks,
Poornima


Loader.
Live Chat Icon For mobile
Up arrow icon