Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Last Day of the Month
Message
De
17/01/2001 13:08:12
GW Gross
{Banned by Information Security Policy}
Lake Mary, Floride, États-Unis
 
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00464689
Message ID:
00464787
Vues:
10
Igor said:

<Select * From TableName Where Month(CreationDate)=1;


---------

Thanks Igor, that just saved me a whole mess of programming!!! I am provided the month, year doesn't matter, since this is an archive function and I am pulling things out a month at a time and moving them to another file. I guess I really need to learn the SQL statement functions.

BTW: If you want to determine how many days are in the month, I found the following function on VB2TheMax:

'**********Determine the last day of the month
Private Function mintLastDayOfMonth(ByVal intMonth As Integer, _
ByVal intYear As Integer) As Integer

mintLastDayOfMonth = DateDiff("d", DateSerial(intYear, intMonth, 1), _
DateSerial(intYear, intMonth + 1, 1))

End Function

Thanks again,
GW Gross

"You are blessed when you're content with just who you are - no more, no less." Matthew 5:5 (The Message)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform