Problem with Date

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi,

I have some dates in text format that are not good. Is there a way to split the date from text format into date format.

example:

A) Text Field: 01/27/2003
B) Text Field: 01/14/03

I want to change this to:

A) Date Field: 27/01/2003
B) Date Field: 14/01/2003

Your help would be much appreciated.
Thanks
 
One way:

Format(CDate(TextDate), "dd/mm/yyyy")

--
Ken Snell
<MS ACCESS MVP>

Hi,

I have some dates in text format that are not good. Is there a way to split
the date from text format into date format.

example:

A) Text Field: 01/27/2003
B) Text Field: 01/14/03

I want to change this to:

A) Date Field: 27/01/2003
B) Date Field: 14/01/2003

Your help would be much appreciated.
Thanks
 
Hi,

I have some dates in text format that are not good. Is there a way to split the date from text format into date format.

Could you explain what you mean by 'not good'? A Date/Time field is
stored internally as a Double Float number, a count of days and
fractions of a day since midnight, December 30, 1899. It can be
formatted many different ways.
example:

A) Text Field: 01/27/2003
B) Text Field: 01/14/03

These are correct dates, in the American mm/dd/yy or yyyy convention.
I want to change this to:

A) Date Field: 27/01/2003
B) Date Field: 14/01/2003

You can convert a Text date to a Date/Time field using either the
DateValue() or CDate() functions. One - I don't recall which - uses
the date/time settings in your computer's Start... Control Panel...
Regional... Date and Time window. Once you have converted the field to
a Date/Time, you can use whatever format you would like; Short Date
will honor your system settings, or you can explicitly specify
dd/mm/yyyy.
 
Back
Top