Problem with coding (1 Viewer)

Notsogood

Registered User.
Local time
Today, 10:15
Joined
Jan 21, 2004
Messages
86
I don't know anything about VB6 but have been asked to write a few lines of code for our dept. I have a database named TEST_DATA in C: drive. It has a table called DATA which contains a DATE field in the form dd/mm/yyyy. I have been asked to write a code to change the code to ddmmyyyy.
Please can someone give me the code for this?
Thanks in advance
 

MrsGorilla

Rat Race Participant
Local time
Today, 04:15
Joined
May 6, 2003
Messages
1,745
I'm not sure I understand. Is the database an Access DB or something else? Are they wanting the date changed permenantly in the table?
 

Ron_dK

Cool bop aficionado
Local time
Today, 11:15
Joined
Sep 5, 2002
Messages
2,141
Notsogood said:
I have been asked to write a code to change the code to ddmmyyyy.

You don't need code for that. Just go to control panel > regional options > date and change the date format to what you want.
 

elbweb

Self Taught Hero
Local time
Today, 05:15
Joined
Jul 28, 2006
Messages
126
if it is a date field the data is not acctually stored as a date (i.e. "12/15/2005") its stored as some other number that representents the time/date and it will be displayed in the format you tell it to be displayed when you read the data.

quick example is that if there is a text box that shows the data in access, right click -> properties and change the format, you can see a few different quick formats for the date, all of which the data will follow if it is a true date type field.
 

Users who are viewing this thread

Top Bottom