Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hii
I want to show last day but his dont work for me
load
[selling],
[Date],
Year (date(date#([Date],'YYYYMMDD'),'YYYYMMDD')),
FROM [lib://AttachedFiles/Rp2.xls]
(biff, embedded labels, table is Rp2$)
Where
year (date(date#(Date,'YYYYMMDD'),'YYYYMMDD')) = year(now())
AND MONTH (date(date#(Date,'YYYYMMDD'),'YYYYMMDD'))=Month(Now())
AND DAY(date(date#(Date,'YYYYMMDD'),'YYYYMMDD')=Day(Now()-1));
plzz help me
What is the problem you are getting here? And your where condition looks little unfinished.
Try the one highlighted in red.
LOAD
[selling],
[Date],
Year (date(date#([Date],'YYYYMMDD'),'YYYYMMDD')),
Where year (date(date#([Date],'YYYYMMDD'),'YYYYMMDD')) = year(now()) AND
MONTH (date(date#([Date],'YYYYMMDD'),'YYYYMMDD')) AND --> Where is the condition for this?
DAY(date(date#([Date],'YYYYMMDD'),'YYYYMMDD')) = Day(Date(Date(Date#(Now(), 'DD/MM/YYYY hh:mm:ss')-1, 'MM/DD/YYYY'), 'YYYYMMDD'))
Ok this is all my code
load
[selling],
[Date],
Year (date(date#([Date],'YYYYMMDD'),'YYYYMMDD')),
FROM [lib://AttachedFiles/Rp2.xls]
(biff, embedded labels, table is Rp2$)
Where
year (date(date#(Date,'YYYYMMDD'),'YYYYMMDD')) = year(now())
AND MONTH (date(date#(Date,'YYYYMMDD'),'YYYYMMDD'))=Month(Now())
AND DAY(date(date#(Date,'YYYYMMDD'),'YYYYMMDD')=Day(Now()-1));
I want to show last day this method his dont work for me if you have any idea plzz tell me I need your help
thanks for all
Remove that extra comma in your load statement for your field year. And can i know what is the date format for the field [Date] in excel ?
Try this ? If this doesnt work try share a sample data with expected output.
load
[selling],
[Date],
Year (date(date#([Date],'YYYYMMDD'),'YYYYMMDD'))
FROM
[lib://AttachedFiles/Rp2.xls]
(biff, embedded labels, table is Rp2$)
Where
year(date(date#(Date,'YYYYMMDD'),'YYYYMMDD')) = Year(Date(Date(Date#(Now(), 'DD/MM/YYYY hh:mm:ss'), 'MM/DD/YYYY'), 'YYYYMMDD')) AND
MONTH(date(date#(Date,'YYYYMMDD'),'YYYYMMDD'))= Month(Date(Date(Date#(Now(), 'DD/MM/YYYY hh:mm:ss'), 'MM/DD/YYYY'), 'YYYYMMDD')) AND
DAY(date(date#(Date,'YYYYMMDD'),'YYYYMMDD')) = Day(Date(Date(Date#(Now(), 'DD/MM/YYYY hh:mm:ss')-1, 'MM/DD/YYYY'), 'YYYYMMDD'));
Is show nothing date is blank for me plzz help me guys I want solution if is possible another method advice me
Not sure what exactly are you trying to achieve. You may try like:
Load
[selling],
Date(Date#([Date],'YYYYMMDD')) as Date,
Year (Date#([Date],'YYYYMMDD')) as Year
FROM [lib://AttachedFiles/Rp2.xls]
(biff, embedded labels, table is Rp2$)
Where Floor(Date#([Date],'YYYYMMDD')) =today()-1;
Can you share a sample app and expected output if possible for a quick resolution?
ok thanks for all
the problem is when the day is 01/03/2017 the last day is 28/02/2017 so is show me null or blank because impossible to comaparate betwen the month but after this is work 02/03/2017 _ 03/03/2017 all days is work but again the 31/03/2017 and 01/04/2017 is dont work again
Did you try Tresesco's expression ? Can you share a sample data ?