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
  • 160,644
  • 26
  • 247
  • 397
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
  • 232,247
  • 41
  • 429
  • 459
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
  • 97,193
  • 102
  • 206
  • 364