Link to home
Start Free TrialLog in
Avatar of indyng
indyng

asked on

Why am I getting this error with FormatDateTime?

Hi Experts,

I have the following error:

Error Type:
Microsoft JET Database Engine (0x80040E14)
Undefined function 'FormatDateTime' in expression.
/intermodal/load_record/SearchQueries.asp, line 307

line 307 is: rs.Open strSQL,conn

This is my query:

SELECT Load.LoadID, Load.SAPDate, Load.DeliveryNo, Load.ShipmentNo, Load.ManualNote, ShipFrom.ShipFrom, Load.FromProv, ShipTo.ShipTo, Load.ToProv, Load.PayorOfFreight, Transporter.TransName, [ContainerInitial] & ' ' & [ContainerID] AS [Container], Load.Notes, Users.UserID, Format([CreatedOn],'dd/mm/yy') AS CreatedOnDate, Load.UpdatedBy, Load.UpdatedOn, [Container Initials].ContainerInitial, Load.ContainerID FROM (((Users INNER JOIN (Transporter RIGHT JOIN Load ON Transporter.TransID = Load.TransporterUsed) ON Users.User_Key = Load.CreatedBy) LEFT JOIN ShipFrom ON Load.ShipFromID = ShipFrom.ShipFromID) LEFT JOIN ShipTo ON Load.ShipToID = ShipTo.ShipToID) LEFT JOIN [Container Initials] ON Load.ContainerInitialID = [Container Initials].ContainerInitialID WHERE FormatDateTime([CreatedOn],2) Between #05/01/2006# And #05/31/2006# AND ShipFrom.ShipFrom='CA1D' ORDER BY Load.SAPDate DESC;

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial