android - Android Eclipse 中的 Date.getTime

标签 android eclipse date

这是我为日期赋值的代码:

long saveddatevalue = new Date().getTime();

我只是想知道,这个保存的long变量究竟显示了什么?我希望用它来输出特定天数内的值。

谢谢!

最佳答案

它基本上会为您提供与 System.currentTimeMillis() 相同的结果 - 自 Unix 纪元 1970 年 1 月 1 日午夜以来的毫秒数,UTC。

关于android - Android Eclipse 中的 Date.getTime,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10129857/

相关文章:

java - 异常的 Android UI 问题 : android:scaleType="fitXY and match_parent will not increase the size of an ImageView -

android - Dart/Flutter 中的 "Invalid constructor name"错误

java - 与Eclipse的Gradle集成

xml - yyyy-mm-dd 格式的日期不会抛出错误

java - 如何更改我的代码,以便结果基于用户输入的年日?

Mysql select where date = now if Y-m-d H :i:s

java - 如何更改 MPAndroidChart PieChart 上的描述文字大小”?

android - 房间 : deleting a ForeignKey or setting the ForeignKey to a default value

eclipse - Eclipse 中最近的文件数量 > 15?

java - clientApplicationContext xml 文件出现问题