PC Review


Reply
Thread Tools Rate Thread

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

 
 
mimi
Guest
Posts: n/a
 
      6th Aug 2004
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



 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      6th Aug 2004
mimi <(E-Mail Removed)> wrote:
> 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.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert date() to DateTime format Ryan Ramsey Microsoft C# .NET 1 21st Jul 2006 07:47 AM
Date & DateTime datatypes format =?Utf-8?B?RWQ=?= Microsoft Dot NET 3 8th Jun 2005 05:58 PM
query date of a datetime format =?Utf-8?B?YWdlcjY2OQ==?= Microsoft Access Queries 2 28th Mar 2005 12:29 AM
Create Table - DateTime format Van T. Dinh Microsoft Access Getting Started 8 1st Sep 2004 02:40 PM
What is an easy way to create DateTime from a string that contains date in the following format "yyyyMMdd"? Arild Bakken Microsoft C# .NET 2 24th Sep 2003 03:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:57 AM.