Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Morning all,
i have a Bottle-Neck that i am struggling with, i have a CreatedDateTime which i want to convert to just Date.
i used TO_CHAR(o.CreatedDateTime, DD-MM-YYYY) which is not working.
please i need help on this.
Thank You.
Hi,
Try this.
Load *,Date(Floor(o.CreatedDateTime)) as NewDate;
Sql Select * from xyz;
Regards,
Kaushik Solanki
Tried it, still no luck
Telling me
Field not found - <o.CreatedDateTime>
here is what i want to INSERT it;
//Item Report
SELECT
i.GroupCode as "ITEM_GROUP",
o.MenuItemName as "MENU_ITEM_NAME",
// To_CHAR(o.CreatedDateTime, 'DD-MM-YYYY') as "ORDER_DATE",
//CONVERT(date[20], o.CreatedDateTime, dd/mm/yyyy) as "ORDER_DATE",
o.Price as "MENU_ITEM_PRICE",
o.Quantity as "MENU_ITEM_QTY"
FROM DashAlata.dbo.MenuItems i, DashAlata.dbo.Orders o
WHERE i.Id = o.MenuItemId;
Field Not Found:
Can you confirm that the Field [CreatedDateTime] exists in table Orders?
CreatedDateTime is in One Table[Order Table] in my Database
is this the same DashAlata.dbo.Orders ?
Yes. The same Table [My Order Table]
Why not perform the Date Conversion at the Preceeding Load (after your SQL script).
going back to your script issue, just to finally confirm field does exists, try querying just the fileds in Orders table:
SQL
SELECT
o.MenuItemName as "MENU_ITEM_NAME",
o.CreatedDateTime as "ORDER_DATE",
o.Price as "MENU_ITEM_PRICE",
o.Quantity as "MENU_ITEM_QTY"
FROM DashAlata.dbo.Orders o
;
after confirming the query runs ok, add your TO_CHAR() or maybe some other functions applicable, TO_DATE() , etc..
Please share the Data like two values. If you share the App that is very use ful
o.CreatedDateTime
It sounds like you are asking for advice on how to compose the SQL query. Perhaps the database vendor has online help to guide you on the suitable function? Or are you having an issue with the data in QlikView?