3

I have used the below the SQLite query to find week of year for Calendar(Jan-Dec).

"SELECT STRFTIME('%W' ,[Orders].[OrderDate] ) AS [Grid_Column_0],SUM([Orders].[Freight]) AS [Grid_Column_1] FROM [Orders] AS [Orders] GROUP BY STRFTIME('%W' ,[Orders].[OrderDate] )  ORDER BY 1 COLLATE NOCASE ASC  LIMIT 200  OFFSET 0;"

This is working fine for me.

Now I want to get the week of year for Fiscal Calendar calculation using SQLite query.

For example. Start Month=March, End Month=Feb.

I expect the result like below

March 1 - 7 => 1st week March 8 - 14 => 2nd week up to Feb.

I need SQLite query to calculate the Week of year for this.

How can I achieve my requirement using SQLite query?

Kavitha M
  • 263
  • 1
  • 7
  • 23

0 Answers0