Question : Doing this works fine: SELECT * FROM table WHERE foo < ‘2021-01-09 00:00:00’ But this one: SELECT * […]
Tag: date
Generic end date of quarter, PostgreSQL
Question : I’d like to produce the generic quarter end date for a given date. Ex:If I have 2010-01-01, I […]
How do I form an SQL query to show entire column of dates with modified values?
Question : Assume that I have a table Purchases with column named PurchaseDate and with data format of ‘YYYY-MM-DD HH:MI:SS’. […]
Convert Date and Filter by Year
Question : I have a date field that is in a ‘yyyymmdd’ format, and I need to filter the query […]
How to encode a known date but unknown year?
Question : I am using a Postgres database, and have a table with a date-time field. For many records, we […]
Convert date in date list condition to list of date ranges
Question : I want to look for all the records that occur on specific dates. SELECT * FROM table1 WHERE […]
Create Date Spans from Contiguous and Non-Contiguous Date Spans
Question : I am trying to create a query that will return a series of dates based off of the […]
Selecting Only One Record with Most Recent Date Using Table Join
Question : I have a list of 463 CARRIER_CD. I am attempting to retrieve the most current BILL_DT for each […]
Fiscal Year to Date filter
Question : This is my data: I need a Fiscal Year to Date logic that will gather all previous months […]
MySQL – Store date as a value with an ID?
Question : I’ve got a database with the following structure: Elements table +————+—————+—————+—–+ | element_id | user_id | element_data2 | […]