Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewforum
Creator II
Creator II

How to remove time stamp from DATE field value.

I have DATE field with time stamp.I want to get away DATE field with time stamp. I tried that using below but it is not removing the time stamp from DATE field value. Please help!

Date(DATE,'MM/DD/YYYY') as PERIOD

1 Solution

Accepted Solutions
sunny_talwar

Use Floor() function

Date(Floor(DATE), 'MM/DD/YYYY') as Period

View solution in original post

8 Replies
sunny_talwar

Use Floor() function

Date(Floor(DATE), 'MM/DD/YYYY') as Period

PrashantSangle

Hi,

Date(DateField,'DD/MM/YYYY')  work if your dateField in date datatype.

If it is string

then you required Date#() or timestamp#()

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 🙂
PradeepReddy
Specialist II
Specialist II

one more option..

Makedate(Year(Date_Field),Month(Date_Field),Day(Date_Field)) as Date_Field_New

swuehl
MVP
MVP

Or DayName() if your default date format is 'MM/DD/YYYY':

DayName( DATE) as PERIOD

qlikviewforum
Creator II
Creator II
Author

Tried that but it didn't worked. I was surprised too.

swuehl
MVP
MVP

Make sure your timestamps are interpreted as such

Why don’t my dates work?

For example, use as default timestamp format code that matches the input format.

sunny_talwar

Is your date correctly read by QlikView? If not then as Max mentioned you might need to use Date#() or TimeStamp#() functions. A good way to check if they are read correctly or not is to create a straight table with DateField as Dimension and Num(DateField) as Expression. If you see numbers against each date, it is read correctly. If not, then you have to use Date#() or TimeStamp#()

qlikviewforum
Creator II
Creator II
Author

Thanks Sunny it is working now not sure what was the issue earlier.