Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding date
Message
 
 
To
11/07/2000 01:05:04
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00390596
Message ID:
00390634
Views:
10
>Hi,
>
>How we want to code as follow: -
>
>1) The system adding one year period of time. For example today date is 11/07/2000 and the expiry date is 11/07/2001.

Try DateAdd("yyyy",1,#11/07/2000#). This will return 1 year from the specified date.

>
>2) If expiring period of a product is one week, the system calculate the expiration period after the expiring date. hence i can impose charges accordingly to the period of time.

Try DateDiff("ww",#11/07/2000#,Now). This will give you the number of weeks from the expiration date to the current date time.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform