DateTime problem: how to create datetime format hh:mm:ss AM/PM without the date

  • Thread starter Thread starter mimi
  • Start date Start date
M

mimi

my database has separate field for date and time so we can capture
employees' time in and out . In Sql, date can be present in smalldatetime
format, which contains only time hh:mm:ss AM/PM. How can I create datetime
format in C# like that in order to update database? Thanks in advance
 
mimi said:
my database has separate field for date and time so we can capture
employees' time in and out . In Sql, date can be present in smalldatetime
format, which contains only time hh:mm:ss AM/PM. How can I create datetime
format in C# like that in order to update database? Thanks in advance

Just use DateTime, and the database should ignore the date part.
 
Back
Top