DateTime - Time Only - Re: Video

Dean Everhart 1,536 Reputation points
2023-03-15T13:41:22.7366667+00:00

Premise:

Right now...I am recording start and stop times within a video within a string field (because it is the easiest way).

I would like to record start and stop times in the best way, one that would (eventually) allow calculation of the difference between start and stop times (duration) and allow playing a video from the start time and end at stop time.

Question:

Is this sort of functionality possible? If so, which field type would be best for this...DateTime...TimeOnly, or does Time in DateTime not useful for recording times in video? What would be the best way to create the property in a class?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,523 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,457 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 116.7K Reputation points
    2023-03-15T15:12:47.8866667+00:00

    I think that the TimeSpan structure can be used for start and stop time. The "-" operator will give the duration.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.