SQL - date and time

Posted on 2006-04-09
Last Modified: 2008-03-17
I have a table, which one of the columns, name "Attempt" on my database. It keeps a record of failure login. It does stamp the date and time on the column.  When I fill it on my datagrid, program. it shows only the date. Could you help to find the soulution?
Question by:VBdotnet2005
    LVL 44

    Accepted Solution

    Hello VBdotnet2005,

    if you bind to the data in designtime, you can format the column

    1. rightclick on the grid
    2. choose edit columns
    3. then select your column that should display the date and time
    4. in the property list goto the appearance block and click the default cell style
    5. here you find a format property where you can select a datetime format for the column to use

    if you bind to your data at runtime you could prepare the format in your SQL query returning a formatted datetime field or change the properties of the columnwhen binding the data to it

    hope this helps a bit

    Author Comment

    excellent :) Thank you

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    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!

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    759 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

    9 Experts available now in Live!

    Get 1:1 Help Now