[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • 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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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