Optimize date2str function
/***************************************************
Created Date: 19 Jul 2013
Created By: Jimmy Xie (Tectura)
Helpdesk Ticket#: TB001613 - Accounts Payable Positive Pay
Description of Behavior: Format extended date
Expected Input:
Expected Output:
***************************************************/
public static str dateFormatExtended2Str_DNT(Date _dateValue,
DNT_DateFormatExtended _dateFormatExtended,
int _separator)
{
#define.123 (123)
#define.132 (132)
#define.213 (213)
#define.231 (231)
#define.312 (312)
#define.321 (321)
#define.0 (0)
#define.2 (2)
#define.4 (4) str ret;
; switch(_DateFormatExtended)
{
case DNT_DateFormatExtended::ddmmyy: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::ddmmyyyy: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::ddyymm: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break; case DNT_DateFormatExtended::ddyyyymm: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::mmddyy: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::mmddyyyy: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::mmyydd: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::mmyyyydd: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::yyddmm: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::yyyyddmm: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::yymmdd: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
case DNT_DateFormatExtended::yyyymmdd: ret = date2str(_dateValue,#,#,_separator,#,_separator,#); break;
} return ret;
}
Optimize date2str function的更多相关文章
- Optimize str2date function
The job can be any string date format convert to AX date format. so that, Do not need to specify str ...
- Stanford机器学习笔记-3.Bayesian statistics and Regularization
3. Bayesian statistics and Regularization Content 3. Bayesian statistics and Regularization. 3.1 Und ...
- MFC Grid control 2.27
原文链接地址:http://www.codeproject.com/Articles/8/MFC-Grid-control MFCGridCtrl是个强大的类,用于数据的表格显示. 1.类特征 Cel ...
- Support Vector Machines for classification
Support Vector Machines for classification To whet your appetite for support vector machines, here’s ...
- 使用Jquery+EasyUI 进行框架项目开发案例讲解之二---用户管理源码分享
使用Jquery+EasyUI 进行框架项目开发案例讲解之二 用户管理源码分享 在上一篇文章<使用Jquery+EasyUI进行框架项目开发案例讲解之一---员工管理源码分享>我们分享 ...
- We Recommend a Singular Value Decomposition
We Recommend a Singular Value Decomposition Introduction The topic of this article, the singular val ...
- <转>机器学习笔记之奇异值分解的几何解释与简单应用
看到的一篇比较好的关于SVD几何解释与简单应用的文章,其实是有中文译本的,但是翻译的太烂,还不如直接看英文原文的.课本上学的往往是知其然不知其所以然,希望这篇文能为所有初学svd的童鞋提供些直观的认识 ...
- 使用Jquery+EasyUI 进行框架项目开发案例解说之二---用户管理源代码分享
使用Jquery+EasyUI 进行框架项目开发案例解说之二 用户管理源代码分享 在上一篇文章<使用Jquery+EasyUI进行框架项目开发案例解说之中的一个---员工管理源代码分享> ...
- [转载]We Recommend a Singular Value Decomposition
原文:http://www.ams.org/samplings/feature-column/fcarc-svd Introduction The topic of this article, the ...
随机推荐
- [JavaEE] applicationContext.xml配置文件使用合集
配置实例 – 1 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http ...
- 免费公测:RDS只读实例
免费公测:RDS只读实例 简要介绍 在对数据库有少量写请求,但有大量的读请求的应用场景下,单个实例可能无法抵抗读取压力, 甚至对主流程业务产生影响.为了实现读取能力的弹性扩展,分担数据库压力,阿里 ...
- 【Android Studio使用教程6】Execution failed for task ':×××:compileReleaseAidl'
使用Android Studio运行项目时候,经常会报一些错,比如 Execution failed for task ':×××:processReleaseResources' Execution ...
- chrom浏览器避免弹出“确定要离开此面吗?”提示框
一.避免弹出提示框 在网上搜了很多,答案大都是设置window.onbeforeunload=null ,但是试用之后无效. 这个问题放了两天之后返回来再次想,终于找到了答案,在此和大家分享一下: 解 ...
- SQL Server使用WITH AS递归查找
很多时候我们会在数据库表中存储树结构的数据,如菜单:一级菜单.二级菜单.三级菜单... 如果树结构层次比较多,如何能够在只知道某节点的情况下,找到此节点下的所有子级数据呢? 在.NET后台可以定义一个 ...
- 正则转nfa:bug消除
正则到nfabug的解决方法 前面提到了这个bug,为了解决这个bug,我们必须在每次引用到一个假名的时候,都构建一个拷贝.现在假设我们遇到了一个假名,并得到了他的开始节点和结束节点,当前的难题就是构 ...
- codeforces 676B B. Pyramid of Glasses(模拟)
题目链接: B. Pyramid of Glasses time limit per test 1 second memory limit per test 256 megabytes input s ...
- poj1330
Nearest Common Ancestors Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 24762 Accept ...
- Matplotlib之无GUI时的解决办法
需添加: import matplotlib as mpl mpl.use('Agg') 而且必须添加在import matplotlib.pyplot之前,否则无效
- Sublime text3 笔记
打算换个编辑器,以前用dw,在到Aptana,都是比较大的编辑器了,打开的时候都有些慢,久闻sublime text3,小巧轻便,插件丰富,所以决定换下 官网下载地址(ps 之前下载了各种的破解版,总 ...