Gives solution for any Error occurs in any Programming Language, .Net Core 3.1, 3.0, C#,Asp.Net,Sqlserver,MVC,Java,Php,Html,Css,Jquery,errors and solutions,Latest News,Technology

Saturday, 3 December 2016

Insert Mongo Date from Scala

No comments :
we can Convert java.util.date to java.sql.date and insert into MongoDB using Scala

SimpleDateFormat sdf = new java.util.SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
val dateForMySql = sdf.format(date)
val date = new java.sql.date(dateForMySql.getTime())

No comments :

Post a Comment