Imran Younus, a software engineer and a relational algebra expert (believe me!) has an interesting tip for people who wish to get time part of datetime, in .net, for comparison purposes;
dMyDateTime.Ticks - DateTime.Parse(dMyDateTime.ToShortDateString).Ticks
This will give least value for 12:00 AM and max value for 11:59:59 PM
Subscribe to:
Post Comments (Atom)
2 comments:
Couldn't one just use dMyDateTime.TimeOfDay.Ticks to achieve the same thing?
Yes you are right but the way I'm doing we can use the portion being subtracted as displacement and adjust the starting time instead of 12:00 AM as least
Post a Comment