Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
i have a field 'Date' having value '16-JUN-2014'
i want only day from the date field i.e 16
tried day(date) it didnt worked
any suggestions are highly appreciated.
Regards
Tausif Khan.
What about LEFT(Date,2)
What about LEFT(Date,2)
Hi,
It seems your date is not in date format then first convert it into date format
Load
Day(Date(Date,'DD-MMM-YYYY')) as DDMMMYYYY_Day
From Source;
Or
Date(Left(Date,2),'DD')
Regards
Anand
Day(Date#(Date, 'DD-MMM-YYYY'))
Hi,
You can achieve it various way
1) using date#()
day(date#(Date,'DD-MMM-YYYY')) as day
or
day(date(date#(Date,'DD-MMM-YYYY'))) as day
or
date(date#(Date,'DD-MMM-YYYY'),'DD') as day
2) using subfield()
subfield(date,'-',1) as day
Regards
it seems your using a string, not a date,
try subfield(Date,'-',1)