Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Timestamp removal from Date

Hi All

I have been trying to remove Timestamp from Date field with following syntax

Date(OVESCO_ADD_DATE, 'MM/DD/YYYY') As OVESCO_ADD_DATE,
DATE(FLOOR(Timestamp#(OVESCO_ADD_DATE)),'MM/DD/YYYY') As OVESCO_ADD_DATE,
Date(Floor(TimeStamp#(OVESCO_ADD_DATE))) As OVESCO_ADD_DATE,
Date(TimeStamp#(OVESCO_ADD_DATE,'MM/DD/YYYY HH:MM:SS'),'MM/DD/YYYY') As OVESCO_ADD_DATE,
Date(Date#(OVESCO_ADD_DATE,'DD/MON/YYYY HH:MM:SS'),'MM/DD/YYYY') as OVESCO_ADD_DATE,

Result is either blank column or duplicate values(MM/DD/YYYY format) in List box.

All I want is this date value in MM/DD/YYYY format

Thanks

Satish

6 Replies
tresesco
MVP
MVP

Use floor() like:

Date(floor(Date#(OVESCO_ADD_DATE,'DD/MON/YYYY HH:MM:SS')),'MM/DD/YYYY') as OVESCO_ADD_DATE,

sunny_talwar

You need to add the Floor function here

Date(Floor(Date#(OVESCO_ADD_DATE,'DD/MON/YYYY HH:MM:SS')),'MM/DD/YYYY') as OVESCO_ADD_DATE,

or use DayName() function

DayName(Date#(OVESCO_ADD_DATE,'DD/MON/YYYY HH:MM:SS')) as OVESCO_ADD_DATE,

Anonymous
Not applicable
Author

Hi Sunny/ Tresesco

I appreciate your reply.

But with both suggestion this date is still blank(null)

sunny_talwar

Try this

Date(Floor(Date#(OVESCO_ADD_DATE,'DD/MMM/YYYY HH:mm:SS')),'MM/DD/YYYY') as OVESCO_ADD_DATE,

Anonymous
Not applicable
Author

Hi Sunny/ Tresesco

Still issue as blank column.

Thanks

sunny_talwar

What is the exact format for OVESCO_ADD_DATE?