extract a day from a long date notation (1 Viewer)

cluster

New member
Local time
Today, 03:47
Joined
Dec 19, 2021
Messages
9
Got a problem,

I got a large database imported from excel with only days on saturday and wednesday. I made it in a long date notation in the hope i could filter it on wednesday or saturday, to no succes. I just want to get 2 seperate queries where i have one where only the wedsnesdays are shown and the other with only saturdays.
I tried with the weekday expression, but don't know what to fill in to the required 'date' part.
Tried many different ways, but i'm just starting to use expressions so it's sometimes difficult to get the expression right with [ ] and or ( ), # ,....

Many thx in advance for helping out
 

oleronesoftwares

Passionate Learner
Local time
Yesterday, 18:47
Joined
Sep 22, 2014
Messages
1,159
criteria under the date field will be like

Weekday ( date_value, [firstdayofweek] )



The link above explains it in detail
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 09:47
Joined
May 7, 2009
Messages
19,231
to follow with post #2,
to get all records for wednesday:

select * from yourTable where Weekday([datefield], 1) = 4;

for saturday data:

select * from yourTable where Weekday([datefield], 1) = 7;
 

cluster

New member
Local time
Today, 03:47
Joined
Dec 19, 2021
Messages
9
to follow with post #2,
to get all records for wednesday:

select * from yourTable where Weekday([datefield], 1) = 4;

for saturday data:

select * from yourTable where Weekday([datefield], 1) = 7;
I do understand the numbering of the days in the week but I don't know what to add in that datefield.... just want all the dates filtered out.
Next is in that tutorial-link above they set an Expr1: Weekday(#12/03/2001#,1) in the field name? I can only choose between my fields that are in my query where i extract the data from.
thx
 

cluster

New member
Local time
Today, 03:47
Joined
Dec 19, 2021
Messages
9
this is what I have now but get an error when activating it, it's in dutch... so sorry about that
date extractl.JPG
 

oleronesoftwares

Passionate Learner
Local time
Yesterday, 18:47
Joined
Sep 22, 2014
Messages
1,159
I do understand the numbering of the days in the week but I don't know what to add in that datefield.... just want all the dates filtered out.
Next is in that tutorial-link above they set an Expr1: Weekday(#12/03/2001#,1) in the field name? I can only choose between my fields that are in my query where i extract the data from.
thx
remove Expr1, remove the quote, use = signs instead
 

oleronesoftwares

Passionate Learner
Local time
Yesterday, 18:47
Joined
Sep 22, 2014
Messages
1,159
weekday.PNG


This returns all thursdays.
5=thursday
4=wednesday

so in your case 4
then similar query you will use 7( for saturday)
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 09:47
Joined
May 7, 2009
Messages
19,231
for wednesday:

Veld: Expr: Weekday([Datum], 1)
Criteria: 4


for saturday:

Veld: Expr: Weekday([Datum], 1)
Criteria: 7
 

cluster

New member
Local time
Today, 03:47
Joined
Dec 19, 2021
Messages
9
date extractl.JPG

When i try to save this I get following error (ruffly translated: the syntaxis of this expression you specified is invalid
fault access.JPG
 

cluster

New member
Local time
Today, 03:47
Joined
Dec 19, 2021
Messages
9
Finally got it the flaw was in the ' , ' behind [Datum] should be ' ; ' instead
FIELD: Weekday([Datum];1)
CRITERIA: 4

Thanks for the help!!! been searching for days!!!
 

Gasman

Enthusiastic Amateur
Local time
Today, 02:47
Joined
Sep 21, 2011
Messages
14,265
Finally got it the flaw was in the ' , ' behind [Datum] should be ' ; ' instead
FIELD: Weekday([Datum];1)
CRITERIA: 4

Thanks for the help!!! been searching for days!!!
Most people's separators are the comma ,, you just happen to use the semicolon ;
Make a note of this, as any other offerings for other questions will likely use the , not the ;
 

Users who are viewing this thread

Top Bottom