Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding date
Message
 
 
À
11/07/2000 01:05:04
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00390596
Message ID:
00390634
Vues:
9
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform