Last active
January 13, 2021 18:49
-
-
Save rghv404/416b00725fbce6de287fa7125c1f3552 to your computer and use it in GitHub Desktop.
Scala Data minus code snippet - works with Java but need syntax revamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.format.DateTimeFormatter | |
import java.time.LocalDate | |
val effective_date = 20210101 | |
val format = DateTimeFormatter.ofPattern("yyyyMMdd") | |
val effective_date_last_year = LocalDate.parse(effective_date, format).minusDays(365).format(format) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment