Can I create a date field in a make table query?

  • Thread starter Thread starter Tcs
  • Start date Start date
T

Tcs

If I know the answer to this, my brain just isn't able to retrieve it...

I have a query which creates a new table. My date data is in three (3) separate fields. (It's on
an IBM box, *nothing* is easy.) I'm creating a new date column by assembling my date data. But
Access (2k3) treats it as Text. To change it, I have to go into Table Design and change the field
type from Text to Date.

Can I create my date field with my query? Or am I stuck with my current method?

Thanks in advance,

Tom
 
What is "my current method"? We haven't seen any code, query, sql, sample
data, values,...
 
"my current method" is my going into Table Design and MANUALLY changing the field type from Text to
Date, after I build the table. Like I said. There *IS* no code to *change* it, just *build* it:

Serv Start: IIf([UTSSYY]>50,[UTSSMM] & "/" & [UTSSDD] & "/" & (1900+([UTSSYY])),[UTSSMM] & "/" &
[UTSSDD] & "/" & (2000+([UTSSYY])))

So the question is, can I specify that this field be of type "Date" in my query, and if so, how?
 
The expression I was looking for was your "Serv Start:..." Try convert your
string/text to a date in the query like:

Serv Start: CDate( IIf([UTSSYY]>50,[UTSSMM] & "/" & [UTSSDD] & "/" &
(1900+([UTSSYY])),[UTSSMM] & "/" &
[UTSSDD] & "/" & (2000+([UTSSYY]))) )


--
Duane Hookom
MS Access MVP


Tcs said:
"my current method" is my going into Table Design and MANUALLY changing
the field type from Text to
Date, after I build the table. Like I said. There *IS* no code to
*change* it, just *build* it:

Serv Start: IIf([UTSSYY]>50,[UTSSMM] & "/" & [UTSSDD] & "/" &
(1900+([UTSSYY])),[UTSSMM] & "/" &
[UTSSDD] & "/" & (2000+([UTSSYY])))

So the question is, can I specify that this field be of type "Date" in my
query, and if so, how?

What is "my current method"? We haven't seen any code, query, sql, sample
data, values,...
 
Back
Top