Microsoft
Software
Hardware
Network
Question : Date conversion
I need to calc two fields for this pass thru query
The first field is working out just fine: SELECT Max([Date]) AS Last_Run_Date
The second field is the problem. I have to deduct 33 days from the Max date on a table.
What am I doing wrong? The query is running but I am getting an error in that column.
OBTW, the field named Date is text.
SELECT Max([Date]) AS Last_Run_Date, DateAdd("d",-33,Max([Date]
)) AS Begin_Date
FROM [Last Record Pulled];
Thanx,
Trudye
Answer : Date conversion
revised because of the format of the data
SELECT Max(DateSerial(Left([Date]
,4),Mid([d
ate],5,2),
Mid([date]
,7,2))) AS Last_Run_Date, DateAdd("d",-33,[Last_Run_
Date]) AS Begin_Date
FROM [Last Record Pulled];
Random Solutions
Error deleting File or Folder cannot delete file: Cannot read fromt he source file or disk
uninstall 2008 sql server
see traffic logs on windows server 2003
How do I specify the entry point for a dll written in vb.net?
Two email servers (incoming), one computer, different results. Why?
XP PC on domain hangs on printing for all applications
How to sum (distinct values) in Access Report
How to enable ap_OACreate
Extract data from XML using sql server 2005Question
Runtime error 490 and followhyperlink