Execl DataTime Format Number
整数部分:年月日(日期)
小数部分:时分秒(时间)
思路
整数部分:
(已知年-1900)*365+已知年/4的整数部分-1900/4+已知月日在当前年产生的天数。
时间部分:
时:实际数值/24
分:实际数值/24/60
秒:实际数值/24/60/60
毫秒:实际数据/10位小数位
然后把这几个数值加起来就是小数部分了。
例子:2014.12.17 12:31:21.135
共多少年: 2014-1900=114
共多少個閏年: 114/4=28
年份共多少天:114*365+28=41638
共多少月:11
時:12/24=0.5
分:31/24/60=0.021
秒:21/24/60/60= 0.0007708333
毫秒:0.135/10=0.0000000000135
值:41990.5217708333135
Execl DataTime Format Number的更多相关文章
- crystal report format number
ToText({#totalPrice}, 2,'.', ',') &" €" http://crystaltricks.com/wordpress/?p=149
- Month format:number to English abbre
``` DATA LV_MONTH TYPE FCKTX. CLEAR:LV_MONTH,lv_date. SELECT SINGLE KTX INTO LV_MONTH FROM T247 WHER ...
- 【BIRT】Format Number下的Round Mode中的各项解释
页面展示 从上图我们可以才看出,共有Half Up.Half Down.Half Even.Up.Down.Celling.Floor.Unnecessary 下面一一介绍每一个的意思 Half Up ...
- XQN number format
Q Numbers FormatAn XQN format number is an 1+X+N bit twos complement binary number; a sign bitfollow ...
- C#详解format函数,各种格式化
一.String Format for Double Digits after decimal point This example formats double to string with fix ...
- Helpers\Number
Helpers\Number This helper has 2 methods for converting a number format and to get a percentage. Num ...
- Friendly number
Friendly number Long numbers can be made to look nicer, so let’s write some code to do just that. Yo ...
- java基础---->String和MessageFormat的format方法
这里介绍一下String和MessageFormat中的format方法的差异以及实现原理. String与MessageFormat的说明 一.两者的使用场景 String.format:for l ...
- Flex的Number和Text
今天要说的问题不是Number和String转换的问题.而是使用时容易出的一些错误: public static function ToFixed(value:Number, digits:uint ...
随机推荐
- tabhost中activity跳转动画不显示的解决办法
[1]如果是tabhost中的activity跳到其他的activity,用这篇blog的方法即可 http://blog.sina.com.cn/s/blog_8db8914301010t31.ht ...
- 408. Valid Word Abbreviation
感冒之后 睡了2天觉 现在痊愈了 重启刷题进程.. Google的题,E难度.. 比较的方法很多,应该是为后面的题铺垫的. 题不难,做对不容易,edge cases很多,修修改改好多次,写完发现是一坨 ...
- DES加密后get获取url参数无法解密问题
参考:http://www.cnblogs.com/lori/archive/2011/09/08/2170979.html 问题,就是URL编码问题,如果不对URL进行编码直接加码,那么在解码时,如 ...
- winform清空DataGridView中的数据 分类: DataGridView 2014-05-19 20:56 180人阅读 评论(0) 收藏
我们一般要把dgv情况,一般用: DataTable dt = (DataTable)dgvData.DataSource; dt.Rows.Clear(); dgvData.DataSource = ...
- jersey构建rest服务返回json数据
1. eclipse 创建 dynamic web project 2. 将jersey相关jar包放到libs目录下 3. web.xml 增加 jersey 相关内容 <?xml ver ...
- PHP+IIS7+PHPMangerForIIS搭建开发环境
准备工作 1.安装IIS 2.安装php 3.安装phpmanager 准备工作做好后,开始搭建环境 1.在Internet信息服务管理器下找到PHPManager 2.点击Register new ...
- Android教程:ImageView 设置图片
Android doc中是这样描述的: public void setImageResource (int resId) 这是其中的一个方法,参数resld是这样: ImageView.setImag ...
- gitlab一键安装
参考 https://about.gitlab.com/downloads/
- Apache SSL服务器配置SSL详解(转)
1.安装必要的软件 引用 我用的是apahce2.0.61版,可以直接官方提供的绑定openssl的apache. 文件名是:apache_2.0.61-win32-x86-openssl-0.9.7 ...
- 【nodejs】创建udp套接字的类型参数的含义
nodejs在创建udp套接字的时候,需要传入一个类型参数.有两种类型参数可供选择:udp4和udp6.udp4对应的就是ipv4,udp6对应的是ipv6.