Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the date 2 years prior to a given date
Message
De
07/01/2006 07:20:08
Alfred Roa
Ebs Accounting Software Solutions
Cagayan de Oro City, Philippines
 
 
À
05/01/2006 18:23:58
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01083849
Message ID:
01084365
Vues:
8
Hi Jay,

Simple, what you need to do is to subtract the year date to two (2), the code goes something like this:

getday = day(date()) && numerically returns the current day
getmonth = month(date()) && numerically returns the current month
getyear = year(date()) - 2 &&get year this less 2

Datetoyearsago = ctod(str(getmonth)+'/'+str(getday)+'/'+str(getyear))


Hope this will help you!

-Alfred
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform