当在数据库中存储的时间类型为bigint类型时,及时间的毫秒数

java中: 

new DATE().gettime();//获取时间的毫秒数

当需要将毫秒数转化为时间的时候

mysql中:

FROM_UNIXTIME( 1431574755832/ 1000,'%Y-%m-%d');

格式化时间类型:now()取得当前时间

DATE_FORMAT(NOW(),'%Y-%m-%d')

该函数将1431574755832毫秒转换为时间并格式化为yyyy-mm-dd的格式;

mysql 毫秒时间转换的更多相关文章

  1. mysql 将时间转换成时间戳

    select UNIX_TIMESTAMP(addtime/*date_column*/) from tablename 输出:1548658912 数据库原格式:2019-01-28 15:01:2 ...

  2. js中的时间转换—毫秒转换成日期时间

    转自:http://www.javascript100.com/?p=181 前几天,在项目中遇到js时间增加问题,要将js毫秒时间转换成日期时间 var oldTime = (new Date(&q ...

  3. JS 时间转换函数 字符串时间转换毫秒(互转)

    字符串转化为日期 let util = function(){ Date.prototype.Format = function(fmt) { var o = { "M+" : t ...

  4. mysql 中 时间和日期函数

    From: http://www.cnblogs.com/redfox241/archive/2009/07/23/1529092.html 一.MySQL 获得当前日期时间 函数 1.1 获得当前日 ...

  5. mysql 转换13位数字毫秒时间

    MySQL毫秒值和日期转换,MYSQL内置函数FROM_UNIXTIME: select FROM_UNIXTIME(t.createDate/1000,'%Y-%m-%d %h:%i:%s') as ...

  6. mysql 时间函数 时间转换函数

    时间函数 Now 获取当前时间 current_timestamp 获取当前时间 localtimestamp 时间转换 UNIX_TIMESTAMP    "2009-09-15 00:0 ...

  7. mysql 日期操作 增减天数、时间转换、时间戳(转换)

    http://hi.baidu.com/juntao_li/item/094d78c6ce1aa060f6c95d0b MySQL datediff(date1,date2):两个日期相减 date1 ...

  8. MySQL 日期、时间转换函数

    MySQL 日期.时间转换函数:date_format(date,format), time_format(time,format) 能够把一个日期/时间转换成各种各样的字符串格式.它是 str_to ...

  9. ios 时间和毫秒数转换

    01-时间和毫秒数的相互转换 //获取毫秒数的时间戳 long inter = [[NSDate date] timeIntervalSince1970]*1000; NSLog(@"%ld ...

随机推荐

  1. 不修改源代码,动态注入Java代码的方法(转)

    转自:https://blog.csdn.net/hiphoon_sun/article/details/38707927 有时,我们需要在不修改源代码的前提下往一个第三方的JAVA程序里注入自己的代 ...

  2. windows 安装 jenkins笔记

    Jenkins 所有镜像列表: http://mirrors.jenkins-ci.org/status.html 可在镜像网站上下载安装文件,比官方下载快些 jenkins 官网地址: https: ...

  3. [REPRINT]MODIFYING USER ACCOUNTS(usermod)

    http://landoflinux.com/linux_usermod_command.html Append Additional Groups to an exiting account use ...

  4. Zip函数(Python)

    >>> z = zip((2,3,4),(33,44,55)) >>> z <zip object at 0x1022cdb88> >>&g ...

  5. 在Delphi中使用系统对应文件类型的图标

    在应用程序的编写中,组合框(ComboBox).列表框(ListBox).等常见的部件,通常不仅要用于显示文字,而且还要显示其与文字相关的图标.在一般的Windows应用程序中,这些图标的显示都要随列 ...

  6. window环境mysql卸载不干净

    停止MySQL服务1添加删除程序中卸载MySQL2到安装目录删除MySQL3删除:C:\Documents and Settings\All Users\Application Data\MySQL ...

  7. iOS 获取self类型

    类型转换快速写法 typeof(self) bself = self; 版权声明:本文为博主原创文章,未经博主允许不得转载.

  8. idea 使用github

    [Toc] #一.首先下载github for window 客户端,或者git客户端 这里只演示gitHub客户端,安装git客户端的话,git.exe很容易找得到. 附上网址:https://de ...

  9. selenium.Cookie 转 okhttp3.Cookie

    package org.rx.util; import lombok.SneakyThrows; import okhttp3.HttpUrl; import org.openqa.selenium. ...

  10. line-height继承

    父元素设置ling-height;子元素继承父元素的line-height 1.ling-height:固定像素 body{ font-size:20px; line-height: 24px; } ...