Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am having the field calender week from this one i need to create month how to do it
Do you have a field that contains a date? If so then the below should work.
Month(Fieldname) as Month,
Orders:
LOAD
applymap('Shippers_Map', ShipperID, 'MISSING') as Shipper,
ShipperID,
CustomerID,
EmployeeID,
EmployeeID as EmployeeSalesID,
Freight,
OrderDate,
Month(OrderDate) as Month,
Year(OrderDate) as Year,
Day(OrderDate) as Day,
applymap('Quarters_Map', num(Month(OrderDate)), Null()) as Quarter,
date(monthstart(OrderDate),'MMM-YYYY') as MonthYear,
OrderID,
1 as OrderIDCounter
;
SQL SELECT *
FROM Orders
order by OrderDate ASC;
Bill
hi,
can you please provide sample data.
Regards
Do you have a field that contains a date? If so then the below should work.
Month(Fieldname) as Month,
Orders:
LOAD
applymap('Shippers_Map', ShipperID, 'MISSING') as Shipper,
ShipperID,
CustomerID,
EmployeeID,
EmployeeID as EmployeeSalesID,
Freight,
OrderDate,
Month(OrderDate) as Month,
Year(OrderDate) as Year,
Day(OrderDate) as Day,
applymap('Quarters_Map', num(Month(OrderDate)), Null()) as Quarter,
date(monthstart(OrderDate),'MMM-YYYY') as MonthYear,
OrderID,
1 as OrderIDCounter
;
SQL SELECT *
FROM Orders
order by OrderDate ASC;
Bill