mainrotor

asked on

# I need help with Date arithmetic in VB6

Hello Experts,

I need help with Date arithmetic in VB6. I have a variable, which I will set to today's date. Then I want to perform some Date arithmetic against that value.

For example:

Dim dteToday as Date

dteToday = '1/9/2014'

If I want the following result to be '1/11/2014', would I simply do this?

dteToday = dteToday +2

Of If I want the following result to be '1/6/2014', would I simply do this?

dteToday = dteToday - 3

Please let me know how to do this. Thanks in advance.

mrotor

I need help with Date arithmetic in VB6. I have a variable, which I will set to today's date. Then I want to perform some Date arithmetic against that value.

For example:

Dim dteToday as Date

dteToday = '1/9/2014'

If I want the following result to be '1/11/2014', would I simply do this?

dteToday = dteToday +2

Of If I want the following result to be '1/6/2014', would I simply do this?

dteToday = dteToday - 3

Please let me know how to do this. Thanks in advance.

mrotor

ASKER CERTIFIED SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.

SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.

Oops... late.