我可以得到毫秒的日期值从日期选择器? (自1970年以来价值毫秒) [英] Can i get miliseconds date value from a datepicker ? (the miliseconds since 1970 value)
本文介绍了我可以得到毫秒的日期值从日期选择器? (自1970年以来价值毫秒)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个datepicker D组;我需要得到的日期的毫秒值。 (自1970年以来价值毫秒)
i have a DatePicker d; and i need to get the miliseconds value of the date. (the miliseconds since 1970 value)
我该怎么办呢?
推荐答案
创建日历对象,并设置在日期选择器和today.getTimeInMillis(),日期和时间
Create a calender object and set the date and time from the date picker and today.getTimeInMillis().
onDateSet(...) {
Calendar c = Calendar.getInstance();
c.set(...);
long mills = c.getTimeInMillis();
}
这篇关于我可以得到毫秒的日期值从日期选择器? (自1970年以来价值毫秒)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文