DateTime Related Functions
string a = "to_date('" + dtpStart.Value.ToString("yyyy/MM/dd") + "', 'yyyy/mm/dd')";
string b = "to_date('" + dtpEnd.Value.ToString("yyyy/MM/dd ") + "23:59:59', 'yyyy/mm/dd hh24:mi:ss')";
gDtNursingIndexMasterResult = getTableData.getTableData("select * from NURSING_INDEX_CHECK_MASTER where CHECK_DATE Between " + a + " and " + b + "");
gDtNursingIndexMasterResult.Tables[0].TableName = "NURSING_INDEX_CHECK_MASTER";
gDtNursingIndexDetailResult = getTableData.getTableData("select * from NURSING_INDEX_CHECK_DETAIL where CHECK_DATE Between " + a + " and " + b + "");
gDtNursingIndexDetailResult.Tables[0].TableName = "NURSING_INDEX_CHECK_DETAIL";
The Oracle/PLSQL TO_DATE function converts a string to a date.
TO_DATE( string1, [ format_mask ], [ nls_language ] )
Parameters or Arguments
string1 is the string that will be converted to a date.
format_mask is optional. This is the format that will be used to convert string1 to a date.
nls_language is optional. This is the nls language used to convert string1 to a date.
| TO_DATE('2003/07/09', 'yyyy/mm/dd') | would return a date value of July 9, 2003 |
| TO_DATE('070903', 'MMDDYY') | would return a date value of July 9, 2003 |
| TO_DATE('20020315', 'yyyymmdd') | would return a date value of Mar 15, 2002 |
String.Format("{0:d/M/yyyy HH:mm:ss}", dt); // "9/3/2008 16:05:07" - english (en-US)
String.Format("{0:t}", dt); // "4:05 PM" ShortTime
String.Format("{0:d}", dt); // "3/9/2008" ShortDate
String.Format("{0:T}", dt); // "4:05:07 PM" LongTime
String.Format("{0:D}", dt); // "Sunday, March 09, 2008" LongDate
String.Format("{0:f}", dt); // "Sunday, March 09, 2008 4:05 PM" LongDate+ShortTime
String.Format("{0:F}", dt); // "Sunday, March 09, 2008 4:05:07 PM" FullDateTime
String.Format("{0:g}", dt); // "3/9/2008 4:05 PM" ShortDate+ShortTime
String.Format("{0:G}", dt); // "3/9/2008 4:05:07 PM" ShortDate+LongTime
String.Format("{0:m}", dt); // "March 09" MonthDay
String.Format("{0:y}", dt); // "March, 2008" YearMonth
String.Format("{0:r}", dt); // "Sun, 09 Mar 2008 16:05:07 GMT" RFC1123
String.Format("{0:s}", dt); // "2008-03-09T16:05:07" SortableDateTime
String.Format("{0:u}", dt); // "2008-03-09 16:05:07Z" UniversalSortableDateTime
http://msdn.microsoft.com/en-us/library/26etazsy(v=vs.110).aspx
DateTime Related Functions的更多相关文章
- The related functions and attributes for managing attributes - 操作属性的重要属性和函数
特性 property 都是类属性(静态变量),但是特性管理的其实是实例属性的存取, ****** 回顾 -'类方法' classmethod 和 '静态方法' staticmethod 皆可以访问类 ...
- Think Python - Chapter 03 - Functions
3.1 Function callsIn the context of programming, a function is a named sequence of statements that p ...
- Oracle Single-Row Functions(单行函数)——NULL-Related Functions
参考资料:http://docs.oracle.com/database/122/SQLRF/Functions.htm#SQLRF006 Single-row functions return a ...
- psutil documentation
Quick links Home page Blog Download Forum What’s new About From project’s home page: psutil (python ...
- psutil官方文档
psutil documentation¶ Quick links Home page Install Blog Forum Download Development guide What’s new ...
- qnx spi 学习笔记
文档还在编辑中,目前排版很乱,边看边写..等写完了编辑 qnx spi 学习 --目前只是看了代码,学的不深入,有错误的地方请联系我 谢谢 spi init spi init应该是分为2条线,一条是 ...
- Clickhouse副本表以及分布式表简单实践
集群配置: 192.168.0.106 node3 192.168.0.101 node2 192.168.0.103 node1 zookeeper配置忽略,自行实践! node1配置: <? ...
- Prometheus监控学习笔记之Prometheus存储
0x00 概述 Prometheus之于kubernetes(监控领域),如kubernetes之于容器编排.随着heapster不再开发和维护以及influxdb 集群方案不再开源,heapster ...
- ansible应用
前言: 假如让你在一组服务器安装某个软件,服务器少的话还可以接受,但如果有上百台服务器的话,这样会耗费大量时间,在这时候Ansible就由此而生:总之Ansible提供的很多模块十分强大. 一.关于a ...
随机推荐
- hdu 4666:Hyperspace(最远曼哈顿距离 + STL使用)
Hyperspace Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Tota ...
- [杂]SQL Server 之 Understanding Connection Pooling and Transactions
A SqlConnection consists of two parts: the public instance that your code interacts with (the outer ...
- PHP 判断数组里的值是否有存在
一维数组检测<?php $a = array('as','ddf','ddf','as','qwe','wer','ert'); $res = array_unique($a); var_d ...
- GitHub在Visual Studio 2015中获得TFS/VSO同等地位
(此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 在Visual Studio 2015中微软为GitHub提供了扩展插件,从而让GitHub ...
- Effective C++笔记:资源管理
资源:动态分配的内存.文件描述器.互斥锁.图形界面中的字型与笔刷.数据库连接以及网络sockets等,无论哪一种资源,重要的是,当你不再使用它时,必须将它还给系统. 条款13:以对象管理资源 当我们向 ...
- POJ 3461 Oulipo KMP
题意:统计其中一个子串的出现次数 题解:即KMP算法中j==m的次数 //作者:1085422276 #include <cstdio> #include <cmath> #i ...
- 将long型转换为多少MB的方法
Formatter.formatFileSize( this, processInfo.getMemsize()) public class DensityUtil { /** * 根据手机的分辨率从 ...
- nignx重启启动关闭
http://www.cnblogs.com/jianxie/p/3990377.html 一.启动 cd usr/local/nginx/sbin ./nginx cd usr/local/ngin ...
- 用SQL语句添加删除修改字段
1.增加字段 alter table docdsp add dspcodechar(200)2.删除字段 ALTER TABLE table_NAME DROP COLUMNc ...
- Playmaker Input篇教程之PlayMaker菜单概述
Playmaker Input篇教程之PlayMaker菜单概述 Playmaker InputPlayMaker菜单概述 Playmaker插件被导入游戏项目以后,会自动为Unity编辑器添加一个名 ...