MESE="12/2016"
this is a part of my sql:
...AND FORMAT(PRE.DATA_OP,'MM/YYYY')='" & MESE & "'" &...
is this the correct way, or ?
note:
MESE As string
i'm in VB6, Ado Jet and Access database
SELECT with month and year
-
- PlatinumLounger
- Posts: 4368
- Joined: 26 Apr 2010, 17:36
SELECT with month and year
Last edited by sal21 on 23 Dec 2016, 20:31, edited 1 time in total.
-
- Administrator
- Posts: 78588
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: SELECT with month and year
That should work, assuming that MESE always has 2 digits for the month (for example, for August: "08/2016").
Best wishes,
Hans
Hans