티스토리 뷰
쿼리
(:붙는게 변수)
:timestamp AT TIME ZONE :timezone // :timezone 의 타임존을 가진 :timestamp
ex) timestamp = 2021-01-01 09:00 Etc/UTC
→ timestamp AT TIME ZONE 'Asia/Seoul' = 2021-01-01 18:00 Asia/Seoul
to_date(:timestamp, 'yyyy-mm-dd') // parse string to date type
EXTRACT(HOUR FROM :date) //date에서 hour만 뽑아냄
:date +- :number // number만큼 날짜 +나 -짐
TO_TIMESTAMP_TZ(CONCAT(:timestamp, :timezone), 'yyyy-mm-dd hh24miTZR') // parse to timestamp with timezone type
SYSTIMESTAMP //current system timestamp
java
- 첫 문자가 대문자면 클래스, 소문자면 인스턴스
LocalDate.parse() // yyyy-MM-dd
localDate1.until(localDate2, ChronoUnit ) // 며칠 차이나는지 계산해줌. long return
localDate.plusDays(amountDay) // add day
LocalDate.now() // get current loca date. timezone is SystemTimezone
LocalTime.now() // get current loca time. timezone is SystemTimezone
ZoneId.systemDefault() // get SystemTimezone
LocalDateTime.parse() // yyyy-MM-ddThh:mi:ss
LocalDateTime.parse(stringDateTime, DateTimeFormatter.ISO_DATE_TIME/ISO_DATE)
localDateTime.withHour(hour).withMinute(minute).withSecond(second) //hour:minute:second 로 설정
LocalDateTime.now().truncatedTo(ChronoUnit.MINUTES) // ~ 00초로 자르기
localDateTime.toLocalDate()
- Total
- Today
- Yesterday
- DesignSystem
- querydsl
- TroubleShooting
- 메모리 릭
- gitignore
- aws
- 암호화
- fetchResults
- IntelliJ
- 코테 log
- WebClient
- sort algorithm
- SHA
- point
- 이벤트스토밍
- Generic
- Encoding
- ruby
- Spring-Boot
- 이펙티브자바
- effective-java
- Git
- ActiveAdmin
- 사고..
- ASCII
- 실용주의
- Lombok
- SQL 전문가 가이드
- annotation
- Java
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |