View Full Version : Problem with coding


Notsogood
07-26-2006, 05:37 AM
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
07-26-2006, 02:06 PM
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
07-29-2006, 03:12 AM
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
07-29-2006, 08:15 AM
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.