作者:mobiledu2502891413 | 来源:互联网 | 2024-10-10 16:39
Iwaswondering,isthereawaytocreateatimestampinc#fromadatetime?Ineedamillisecondpr
I was wondering, is there a way to create a timestamp in c# from a datetime? I need a millisecond precision value that also works in Compact Framework(saying that since DateTime.ToBinary() does not exist in CF).
我想知道,有没有办法在日期时间在c#中创建时间戳?我需要一个毫秒精度值,它也可以在Compact Framework中工作(因为在CF中不存在DateTime.ToBinary())。
My problem is that i want to store this value in a database agnostic way so i can sortby it later and find out which value is greater from another etc.
我的问题是我想以数据库不可知的方式存储这个值,所以我可以稍后对它进行排序,并找出哪个值来自另一个等等。
6 个解决方案