• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

SQL - date and time

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, VB.net program. it shows only the date. Could you help to find the soulution?
0
VBdotnet2005
Asked:
VBdotnet2005
1 Solution
 
bruintjeCommented:
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
bruintje
0
 
VBdotnet2005Author Commented:
excellent :) Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now