Created
June 30, 2017 15:39
-
-
Save hcarvalhoalves/9f30effd27ab095710a83110582975cb to your computer and use it in GitHub Desktop.
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
def coerceDate(dateFormat: String)(dateAsString: String) = { | |
val fmt = new java.text.SimpleDateFormat(dateFormat) | |
val dt = fmt.parse(dateAsString) | |
new java.sql.Date(dt.getYear, dt.getMonth, dt.getDay) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment