I am using nscala-time (wrapper for Joda Time) and slick for a project. I\'m trying to use this clause to write a line to the database:
Article.insert(0,\"ti
There's no magic about it. Your first statement:
DateTime.now.getMillis
is a Long. A Long is not a Timestamp, so it makes sense that you can't convert it to one by using asInstanceOf.
The second statement:
new Timestamp(dateTime.getMillis())
is using the Timestamp constructor to create a new Timestamp instance based on the dateTime.getMillis.