date format not formatting correct date

H

Haroon

hi

my data from combobox comes from access database and also gets populated in
textboxes, however, i have a date field in ms access which displays date as
10/02/2009 (10th feb 2009) but when i format it to display as 10 february
2009 in the textbox it shows as 02 october 2009

the code is:
TextBox8.Value = ComboBox1.Column(2)
TextBox8.Value = Format(TextBox8.Value, "dd mmmm yyyy")

anyone knows why it displays wrong date?

thanks.
 
K

Karl E. Peterson

Haroon said:
my data from combobox comes from access database and also gets populated in
textboxes, however, i have a date field in ms access which displays date as
10/02/2009 (10th feb 2009) but when i format it to display as 10 february
2009 in the textbox it shows as 02 october 2009

the code is:
TextBox8.Value = ComboBox1.Column(2)
TextBox8.Value = Format(TextBox8.Value, "dd mmmm yyyy")

anyone knows why it displays wrong date?

Looks like the right date to me. It's a perspective thing, eh?

How is your machine configured? I see you're set to be in the Pacific timezone
(Redmond Standard Time) -- did you also leave it to default to US English for the
regional settings? Take a look at Regional and Language Settings in your Control
Panel.

Oh, btw, now that the date is stored as Oct 2 in your MDB, that's what it is. What
you really need to address, here, is how it got stored as that in the first place.
 
H

Haroon

sorted!

the code should be:

TextBox8.Value = ComboBox1.Column(2)
TextBox8.Value = Format(combobox1.column(2), "dd mmmm yyyy")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top