Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering Date via SQL Query
My underlying database is Excel and I am writing all DB relate
operations using ADO in Visual Basic Editor of Excel (VBA). I am usin Excel Driver. The data is stored directly into Excel columns a mentioned in the insert query. But, when I enter the date value in a column, it attaches single-quote(') before the value. I have applied date-formatting to th respective column as (mm/dd/yyyy), but still it doesn't work. I want t programmatically enter the date value without any single-quote i.e th value should be treated as date datatype. Because of this single-quote(') to the date value which the date-valu in the cell to be considered as TEXT and hence whenever I want to fetc records between date-range, the SELECT query does not pick-up prope records. [Since the end-user of my application will not open the files and mak manual changes, i want the proper date entry to be made without an single quote...] Sample Query: INSERT INTO [mms_instrDR_dtl$](strInstrSeqNbr, dtDR dtCreated,strCreatedBy VALUES('CLDEL01040400002',#7/21/2004#,#7/21/2004#,'ajit') Please help me !!! Trying from last 2 days. -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
entering parameter criteria MS Query | Excel Discussion (Misc queries) | |||
Microsoft Query - Entering Column Names with Blanks | Excel Discussion (Misc queries) | |||
Automatically entering date | Excel Discussion (Misc queries) | |||
In Excel 2003, entering date without slashes, the date is incorre. | Excel Discussion (Misc queries) | |||
Entering Query Parameters by UserForm | Excel Programming |