Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Converter {
- @TypeConverter
- fun fromTimestamp(value: Long?): Date? {
- return if (value == null) null else Date(value)
- }
- @TypeConverter
- fun dateToTimestamp(date: Date?): Long? {
- return date?.time
- }
- }
Add Comment
Please, Sign In to add comment