- /// <summary>
- /// 将DATETIME类型的对象转为可用的BYTE数组
- /// </summary>
- /// <param name="dt"></param>
- /// <returns></returns>
- private byte[] DateTimeToBytes(DateTime dt)
- {
- byte[] bytes = new byte[6];
- if (dt != null)
- {
- bytes[0] = Convert.ToByte(dt.Year.ToString().Substring(2, 2),16);
C#中将DateTime类型转换成Byte数组
最新推荐文章于 2024-05-23 19:05:20 发布