I have a table which contains a date of birth. The field was originally set
up as a date/time field and formated as a long date. I now need to convert
this field to a text or number field and I need to eliminate the "/" that
appears between the month, day and year.
Is this possible?
Jeff Boyce - 23 Jul 2007 20:17 GMT
Do you need to modify the data in your table, or do you need to display
what's there in a different way? You could keep your existing data and use
a query to Format() that field, changing how it appears in forms, reports,
etc.
Regards
Jeff Boyce
Microsoft Office/Access MVP
>I have a table which contains a date of birth. The field was originally
>set
[quoted text clipped - 4 lines]
>
> Is this possible?
Douglas J. Steele - 23 Jul 2007 20:19 GMT
Why?
Create a query and put a computed field in it.
To convert to text, you can use
Format([DOB], "mmddyyyy")
(or whatever format you want)
To convert to a number, you can use
CLng(Format([DOB], "mmddyyyy"))
You'd then use the query wherever you would otherwise have used the table.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I have a table which contains a date of birth. The field was originally
>set
[quoted text clipped - 4 lines]
>
> Is this possible?
Wayne-I-M - 23 Jul 2007 20:22 GMT
Hi
I Think you may be making a mistake with this, but you know your database
and I don't so if you simply want to remove the / then go to the table in
design view and select the field with the time/date info. Set the format as
ddmmyyyy or (in the US) mmddyyyy -
To convert the data to text you could use a query - I would NOT do this
though ?? Better to use a calculated field and keep both
TextDate:'"' & Format$([FieldName],"ddmmyyyy") & '"'
or
TextDate:'"' & Format$([FieldName],"mmddyyyy") & '"'
to get the number (or are you looking for the serial number ?) - the integer
use
Val - format - etc
Good luck

Signature
Wayne
Manchester, England.
> I have a table which contains a date of birth. The field was originally set
> up as a date/time field and formated as a long date. I now need to convert
> this field to a text or number field and I need to eliminate the "/" that
> appears between the month, day and year.
>
> Is this possible?
Jackie L - 23 Jul 2007 20:24 GMT
In a Query, try:
NewDate:Format([DateField],"mmddyy")
You can use this field in an Update query to alter the data in your table.
Make sure the field you are updating is a text field. It is also a good idea
to not overwrite the field you are trying to convert unless you have a good
copy you can get back to.
Depending on how your data is saved (if it is not truly a date field), you
can also use the Replace function.
Hope this helps.
> I have a table which contains a date of birth. The field was originally set
> up as a date/time field and formated as a long date. I now need to convert
> this field to a text or number field and I need to eliminate the "/" that
> appears between the month, day and year.
>
> Is this possible?