Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function or procedure to return number of days in month/
Message
 
 
À
29/10/2006 16:19:51
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01165383
Message ID:
01165384
Vues:
14
>Hello comunity
>
>I need some help for create a procedure or function that can use on any code to return by Year the number of days in determinate Month.
>For example if i want to know for a specific year the number of days in determinate month.
>i can create for example sails between two dates and for a particular year and i want to return the totals of sails in this year by divide them for the number of days in this month.
>
>Many thanks
>Luis Santos
function NumberOfDaysInMonth
lparameters tnYear, tnMonth

local ldDate

ldDate = date(m.tnYear, m.tnMonth, 1) && First day of the month

return day(gomonth(m.ldDate,1)-1)
From the top of my head.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform