I am using week function like:
SELECT sub.id AS ARID , Week (my data) AS Week, is it possible to add the start date of the week, which is related to that week? Something like this: SELECT sub.id AS WKBeginning as week, week (my.data) AS week, My.data By using Pisces in this way, I do not know many unknowingly data - it should be divorced from that also, keep that data on the other side, I will use the number 'lines with' Monday-2014-09-04 ' Instead of the date of the week I want to show it as
Is it possible?
My first answer proved to be incorrect if the source table did not include the full range of weeks (in particular Day of the first week).
To use correctly:
ADDDATE (my.data, INTERVAL 1-DAYOFWEEK (my.data) DAY) True WKBeginning,
< / Pre> should be a correlated sub-query no work when the first day of the week is not included in the data :
SELECT id, WEEK (D) AS Week, ADDAT (D, Interval 1-Day Oyff (D) DAY) Setting the initial day as correct as WSH (Selection Min (D) F You may have to use week () with parameters Defense is (to set the starting day) week and if it happens 0-53 or 1-53, then e.
Comments
Post a Comment