Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format Number field into Date field

Status
Not open for further replies.

realstandman

IS-IT--Management
Oct 29, 2003
87
US
I have linked tables to a server that gives me dates for example 20060216 as a number field. How can I change this to a date/time field? Any Sugestions?

 
DateSerial(Left([linked field],4), Mid([linked field],5,2), Right([linked field],2))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It gives me a #Error in the column when I run the query. PHV I do appreciate all of your answers you have helped me many times.

Stan
 
Any chance you could post the SQL of your query ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
SELECT "0" & [cdclno] & "-0" & [cdwkno] AS [Claim number], clmhdr.chgpno, [cdpdpv]+[cdpdcl] AS [Total Paid], DateSerial(Left([chpddt],4),Mid([chpddt],5,2),Right([chpddt],2)) AS [Paid Date], elgemp.eecvst AS [Coverage Status]
FROM (clmhdr INNER JOIN clmdet ON (clmhdr.chwkno = clmdet.cdwkno) AND (clmhdr.chwkno = clmdet.cdwkno) AND (clmhdr.chclno = clmdet.cdclno)) INNER JOIN elgemp ON clmhdr.chemno = elgemp.eenmbr
WHERE (((clmhdr.chgpno)="75000"));
 
chpddt is ALWAYS formatted as yyyymmdd and NEVER null ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top