获取系统时间,只要年月日,时分秒 年,只要低两位就可以了 并存到 6个字节数组内,如何搞方便
谢谢?
解决方案 »
- 【求一个SQL】
- 请问一下关于C#编写登录验证的问题
- 请问OnPaint里面怎么实现线条自动加粗
- c#中listview 的问题,现在有2列 如何给两列添加值
- 請幫忙看一下加解密的問題.
- [求助]一张页面如何引用另外一个页面内容(不是链接)??
- error CS0246: 未能找到类型或命名空间名称“pInt”(是否缺少 using 指令或程序集引用?)
- 调试高手请进, 多线程程序一运行就崩溃?
- 请教.net(c#)中如何实现图像压缩技术?比如上传大图片直接转换成一定比例的小图片?请高手指教
- 大拿帮我看看这个正则表达式含义,在线等
- WPF有个 Dispatcher,这个到底是神马东西,没理解。。
- c#调用c++的dll问题
string[] arr=s.Split('-');
int[] i={int.Parse(arr[0]),int.Parse(arr[1]),int.Parse(arr[2]),int.Parse(arr[3]),int.Parse(arr[4]),int.Parse(arr[5])};
int year=i[0];
String[] b = a.Split('-');
string c = DateTime.Now.ToLongTimeString();//时间
String[] d = c.Split(':');
{
public static uint toint(DateTime dt)
{
uint x = 0;
x += (uint)(dt.Year - 2000) << 26;
x += (uint)dt.Month << 22;
x += (uint)dt.Day << 17;
x += (uint)dt.Hour << 12;
x += (uint)dt.Minute << 6;
x += (uint)dt.Second;
return x;
}
public static DateTime todt(uint it)
{
return new DateTime(2000 + (int)(it >> 26), (int)(it << 6 >> 28),
(int)(it << 10 >> 27), (int)(it << 15 >> 27),
(int)(it << 20 >> 26), (int)(it << 26 >> 26));
}