Ersten 5 Werktage bzw. erster Montag + 5 Tage als Kriterium in Access Query
Liebe Gemeinde,
wie kann ich in Access 2010 folgendes realisieren:
Ich möchte in einer Access Query als Kriterium die ersten 5 Werktage vom aktuellen Monat haben.
Ein Feld mit Datumswerten ist natürlich vorhanden, bis jetzt schaffe ich es nur die Werte aus der Vorwoche zu filtern:
Ich nehme mal an dass man ohne VBA keine Chance hat(überfordert).
Danke an alle!
Gruß
Dr.
wie kann ich in Access 2010 folgendes realisieren:
Ich möchte in einer Access Query als Kriterium die ersten 5 Werktage vom aktuellen Monat haben.
Ein Feld mit Datumswerten ist natürlich vorhanden, bis jetzt schaffe ich es nur die Werte aus der Vorwoche zu filtern:
=Datum()-Wochentag(Datum())-5 Und <=Datum()-Wochentag(Datum())-1
Ich nehme mal an dass man ohne VBA keine Chance hat(überfordert).
Danke an alle!
Gruß
Dr.
Please also mark the comments that contributed to the solution of the article
Content-Key: 313848
Url: https://administrator.de/contentid/313848
Printed on: April 23, 2024 at 08:04 o'clock
2 Comments
Latest comment
A query is a simple sql query in the background, which you can also use in access to realize that
(Assign your names for fields and table name)
Regards
SELECT TOP 5
FieldXYZ,MyDateField
FROM MYDATATABLE
WHERE ((Weekday([MyDateField])>1 And Weekday([MyDateField])<7 And Month([MyDateField])=Month(Date()) and Year([MyDateField])=Year(Date())))
ORDER by MyDateField;
Regards