0

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?

John Saunders
  • 159,224
  • 26
  • 237
  • 393
user2979962
  • 19
  • 1
  • 4
  • please use the SEARCH function before asking questions. simple googling of your title brings out several answers. – Nahum Dec 29 '13 at 13:10

2 Answers2

4

Use DateTime.Ticks property to get long value which represents date and time of your DateTime object.

Sergey Berezovskiy
  • 224,436
  • 37
  • 411
  • 441
1

You can use DateTime.Ticks Property

Gets the number of ticks that represent the date and time of this instance.

Soner Gönül
  • 94,086
  • 102
  • 195
  • 339