[TIL] LocalDateTime

κΉ€μ‹œμ›Β·2022λ…„ 11μ›” 10일
0

TIL

λͺ©λ‘ 보기
14/30

πŸ“ MemoRepository

List<Memo> findAllByModifiedAtBetweenOrderByModifiedAtDesc(LocalDateTime start, LocalDateTime end);

πŸ“ MemoController

LocalDateTime start = LocalDateTime.now().minusDays(1);
LocalDateTime end = LocalDateTime.now();
return memoRepository.findAllByModifiedAtBetweenOrderByModifiedAtDesc(start, end);

πŸ“Œ ByModifiedAtBetween : μˆ˜μ •λœ μ‹œκ°„λ“€ μ‚¬μ΄μ—μ„œ
πŸ“Œ OrderByModifiedAtDesc : μˆ˜μ •λœ μ‹œκ°„μ„ κΈ°μ€€μœΌλ‘œ λ‚΄λ¦Όμ°¨μˆœ

πŸ“Œ LocalDateTime.now() : ν˜„μž¬
πŸ“Œ LocalDateTime.now().minusDays(1) : ν•˜λ£¨ μ „

profile
IT 개발자 μ‹œμ›

0개의 λŒ“κΈ€

κ΄€λ ¨ μ±„μš© 정보