elcentro3m
Aug 8 2007, 05:27 PM
I've got three number fields, imported from an online database.
One for Birthmonth
One for Birthday
and
One for Birthyear
Before I give up, is there any way in a query
to convert:
7/6/2006
for example, to:
07/06/2006
??
Since they come over as numbers, I'd just as soon
keep them numbers and convert them programmatically.
I've tried formatting the fields to "00".
I've tried converting them to strings using 'CStr'
and
I've tried using IIf constructs based on length
and
'Format' in the query.
Anyone?
Thanx.
dannyseager
Aug 8 2007, 05:30 PM
try
format(dateserial([YearField],[MonthField],[DayField]),"DD/MM/YYYY")
or "MM/DD/YYYY" if you want american format
Alan_G
Aug 8 2007, 05:35 PM
In a new field in your query, try
MyDate:Format([Birthday] & " " & [Birthmonth] & " " & [Birthyear],"dd/mm/yyyy")
elcentro3m
Aug 10 2007, 02:10 PM
That worked.
Thanx.
(Both of you)
Alan_G
Aug 10 2007, 05:48 PM
You're welcome - glad we could help
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.