TimeOfDay() returns 1/1/0001

Posted on 2006-05-23
Last Modified: 2008-03-17
I am using TimeOf Day to retrieve the current time, but it returns something like
1/1/0001 11:33:35 AM

And I use NOW() to return the current Date, but it returns the time also.
How do I get the date only, like 5/23/06 and time only, like 11:33:35 AM
Thanks for help
Question by:CochiseCounty
    1 Comment
    LVL 33

    Accepted Solution

    I believe a datetime type has both a ".Date" and a ".Time" property, that you can use to retrieve only the time you are interested in.

    You might also want to look at the .ToShortDateString() and .ToShortTimeString() methods of the DateTime class, these might be what you are looking for.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now