UnussKhan created SPARK-16373:
---------------------------------

             Summary: Joda Datetime , unable to validate the year format
                 Key: SPARK-16373
                 URL: https://issues.apache.org/jira/browse/SPARK-16373
             Project: Spark
          Issue Type: Bug
          Components: Spark Core
            Reporter: UnussKhan
            Priority: Minor


I am using Joda DateTime function in scala to validate the year format as 
follows
def isValidDateType(value: String, Date_format: String): Unit = {
    val fmt = DateTimeFormat forPattern Date_format
    val output = fmt parseDateTime value
    println(output)
}

isValidDateType("20156-06-06","yyyy-MM-dd")

Output : 20156-06-06T00:00:00.000+05:30

isValidDateType("201-06-06","yyyy-MM-dd")

Output: 0201-06-06T00:00:00.000+05:53:28

Its not validating the year format.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to