There is no Format in VBScript, sorry. And please stop using ambiguous
formats like mm/dd/yyyy.
http://www.aspfaq.com/2023
--
Please post DDL, sample data and desired results.
See
http://www.aspfaq.com/5006 for info.
"Jack" <> wrote in message
news:628506C4-7FF0-4AC0-B324-...
> Hi,
> I cannot get the date format correctly in dynamic sql statement, after
> trying various ways of handling it. I need some help with the date format
in
> the following dynamic sql statement. Any help is appreciated in advance.
> While running the asp page, I still get an error as
> Error Type:
> Microsoft VBScript runtime (0x800A000D)
> Type mismatch: 'Format'
>
> DYNAMIC SQL STATEMENT:
> sql = " INSERT INTO tblExpense (ENO, EntryDate, ContractedServiceExpense,
"
> sql = sql & "TravelExpense, PersonnelExpense)"
> sql = sql & " VALUES('" & l_ENO & "', " & Format(l_Date,
> "\#mm\/dd\/yyyy\#") & ", " & l_contractedserviceexpense & ", "
> &l_travelexpense & ", " &l_personnelexpense & ")"
>
>