A family of Microsoft relational database management systems designed for ease of use.
drop table PiecesMinifigsSets;
create table PiecesMinifigsSets (item_description text,qty double,PaymentDate datetime);
insert into PiecesMinifigsSets values('black title',0.11,#2022-10-26#);
insert into PiecesMinifigsSets values('black title',0.11,#2022-10-21#);
select *,PaymentDate-weekday(PaymentDate,2),dateadd('d',-1*DatePart('w',PaymentDate,2)+1,PaymentDate) from PiecesMinifigsSets;
| Expr1000 | Expr1001 | item_description | qty | PaymentDate |
|---|---|---|---|---|
| 2022/10/23 | 2022/10/24 | black title | .11 | 2022/10/26 |
| 2022/10/16 | 2022/10/17 | black title | .11 | 2022/10/21 |
select *,PaymentDate-weekday(PaymentDate,3) from PiecesMinifigsSets where (PaymentDate-weekday(PaymentDate,3))=#2022-10-24#;
| Expr1000 | item_description | qty | PaymentDate |
|---|---|---|---|
| 2022/10/24 | black title | .11 | 2022/10/26 |
select *,dateadd('d',-1*DatePart('w',PaymentDate,2)+1,PaymentDate) from PiecesMinifigsSets where (dateadd('d',-1*DatePart('w',PaymentDate,2)+1,PaymentDate))=#2022-10-24#;
| Expr1000 | item_description | qty | PaymentDate |
|---|---|---|---|
| 2022/10/24 | black title | .11 | 2022/10/26 |