Append Query

  • Thread starter Thread starter jimmy.kirk
  • Start date Start date
J

jimmy.kirk

I just recently wrote a script that uses an append query to add records
to a table. I just found out that the original timestamp I'm pulling is
in mountain time. Is there any way to update that on the fly while
running the append query?

Jimmy
 
The Append Query in question...

INSERT INTO [Itemized Records] ( [Date], CustomerID, IntrType, Subject,
CreateOper )
SELECT Itemized.CREATE_DATETIME, Itemized.CUSTOMER_ID,
Itemized.INTR_TYPE, Itemized.SUBJECT, Itemized.CREATE_OPER
FROM Itemized;
 
I just recently wrote a script that uses an append query to add records
to a table. I just found out that the original timestamp I'm pulling is
in mountain time. Is there any way to update that on the fly while
running the append query?

Jimmy

Update to... what? Pacific time? GMT?

You can use the DateAdd function to convert the field:

INSERT INTO [Itemized Records] ( [Date], CustomerID, IntrType,
Subject,
CreateOper )
SELECT DateAdd("h", -1, Itemized.CREATE_DATETIME),
Itemized.CUSTOMER_ID,
Itemized.INTR_TYPE, Itemized.SUBJECT, Itemized.CREATE_OPER
FROM Itemized;

will convert Mountain to Pacific.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top