Reputation: 20429
For ex., I have the following value:
Time.valueOf("2:00:00")
how should I convert it to Long? (to be stored in SQLite database as Real)
Long
Real
java.sql.Time is used.
java.sql.Time
Upvotes: 4
Views: 21166
Reputation: 137412
Use getTime():
Time t = Time.valueOf("2:00:00"); long l = t.getTime();
Upvotes: 17