Solved

showing only date, not time, in Data Form Wizard field from access table

Posted on 2004-08-22
1
144 Views
Last Modified: 2010-04-23
I've used the Data Form Wizard to display/enter dates the user has entered.  It's connected to an access table and it keeps displaying the time even though it's a Short Date in the access table.  I've seen other answers but they all have to do with SQL.  I have very limited experience in sql if it requires coding. Please help.
0
Comment
Question by:chrisamuel
1 Comment
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 50 total points
ID: 11870066
If you don't want to do it in sql use the onformat event of the databinding

something like this

   Private Sub DataForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim oBind As Binding = New Binding("Text", Me.yourdataset, "Table1.yourdate")
        AddHandler oBind.Format, AddressOf formatdate2
        Me.yourtextbox.DataBindings.Add(oBind)

    End Sub


    Private Sub formatdate2(ByVal sender As Object, ByVal cevent As ConvertEventArgs)
        cevent.Value = CType(cevent.Value, Date).ToString("d")
    End Sub
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Calculate number of nights between two dates 5 85
Name Space error VS2015 1 35
vb.net sendkey 4 17
VB.net Excel VSTO Add-in version compatability 2 12
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

680 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