I have the following format in my sql row (DateTime datatype):
00:04:01.
I load it into my program and insert it into a DateTime object. Let's call this object "date". How can I convert "date" into a long value?
I have the following format in my sql row (DateTime datatype):
00:04:01.
I load it into my program and insert it into a DateTime object. Let's call this object "date". How can I convert "date" into a long value?
Use DateTime.Ticks
property to get long value which represents date and time of your DateTime
object.
You can use DateTime.Ticks
Property
Gets the number of ticks that represent the date and time of this instance.