Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Clever_Anjos
Employee
Employee

it seems your using a string, not a date,

try subfield(Date,'-',1)