How to get last date of the lastweek in sql? I mean last sunday date using query?
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
Last Sunday (Which is the end of "last week")
This Week (Assuming Mon-Sun Week Format)
Results
Examples to explain the voodoo (Use this to change above SQL to your desired Week Starting and Week Ending day-of-week)
SQL Below
To get the previous sunday, or today if today is sunday, try this
This will get you the next and precious Friday from a given date and time
The SQL is more straightforward with a suitable calendar table. No voodoo.