Solved Format Function to get current week or current quarter data

hrdpgajjar

Registered User.
Local time
Today, 04:58
Joined
Sep 24, 2019
Messages
134
Hi all,
I need to get report of material sent by current week with a query. I am able to get report of current month by following funtion,

Format([Material Sent Date], "yyyymm") - by this function I am able to get current month data and,

Format([Material Sent Date], date()) - by this function I am able to get current date (todays date) data

but I need to get data of current week and current quarter by the above function.

Please help how can I do that.


Thank you,
 
Not sure about the quarter but week would be Format(datefield,"ww") I believe?

Have you tried Google?
 
you can use

Format([Material Sent Date], "ww") '==> the return is string.
DatePart("ww", [Material Sent Date]) '==>return numeric
 
Hi all,
I need to get report of material sent by current week with a query. I am able to get report of current month by following funtion,

Format([Material Sent Date], "yyyymm") - by this function I am able to get current month data and,

Format([Material Sent Date], date()) - by this function I am able to get current date (todays date) data

but I need to get data of current week and current quarter by the above function.

Please help how can I do that.


Thank you,
Hi. Format() doesn't have a quarter symbol, but DatePart() does.
 
what did you do so far?

then you need to Modify [Material Sent Date] field (change it to Date/Time).
 
what did you do so far?

then you need to Modify [Material Sent Date] field (change it to Date/Time).
the field is already a date/time format. And I am putting the format function in query filed. Is it alright or I m doing something wrong?
 
Format() always returns a string?
You were using it yourself, so you should be aware?
I am aware of this. Already get it working in current month format. But anyhow it does not work for current week..
 
what did you do so far?

then you need to Modify [Material Sent Date] field (change it to Date/Time).
Can you send me the sample data base with just name and date columns with the working query for my reference pls..
 

Users who are viewing this thread

Back
Top Bottom