2022年3月10日 星期四

timestamp 查詢某月份資料

這裡timestamp和timestamp with time zone都可以處理

Select * From patient_examine_order where to_char(sampling_date, 'YYYYMM') like '202102%'

可以使用to_char再搭配like組字做使用

超難的阿~~

https://www.postgresql.org/docs/9.6/functions-formatting.html

沒有留言:

張貼留言

2026年新年新目標

從今年開始預計2.5-3年後成為能應徵國際大廠的頂尖工程師 今年在程式上 1 每個月看看能不能都做專案, 一年12專案 2 刷題每周4題 3 跑個人scrum, 並組讀書會 4規律讀英文ex每天早上8:30-9:30 5規律運動7:35-8:30 6減肥97->85 而下班...