Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


TimeOfDay() returns 1/1/0001

Posted on 2006-05-23
Medium Priority
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

raterus earned 500 total points
ID: 16745179
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


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

578 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