Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fetch Day from date

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.

1 Solution

Accepted Solutions
robert_mika
Master III
Master III

What about LEFT(Date,2)

View solution in original post

5 Replies
robert_mika
Master III
Master III

What about LEFT(Date,2)

its_anandrjs

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

MarcoWedel

Day(Date#(Date, 'DD-MMM-YYYY'))

PrashantSangle

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

Great dreamer's dreams never fulfilled, they are always transcended.
Clever_Anjos
Employee
Employee

it seems your using a string, not a date,

try subfield(Date,'-',1)