Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Creator III
Creator III

Dt

Hi All ,

I have date formate like below

01-MAY-17 12:45:00

Iam using below script to get like this

01-05-2017 ( wanted to remove the time )

But after reloading this dont show any value

Date(Date#(BillingDate,'DD-MMM-YY hh.mm.ss'),'DD-MM-YYYY')as BDT,

How to rectyfy this

Thanks in Advance

1 Solution

Accepted Solutions
its_anandrjs

Yes sure it convert your date into pure date with Date function after using slice and dice on the Date fields. Of coursers it works for you.

View solution in original post

10 Replies
swuehl
MVP
MVP

Maybe adjust the time spearator from . to : and use floor()

Date(Floor(Date#(BillingDate,'DD-MMM-YY hh:mm:ss')),'DD-MM-YYYY') as BDT,

antoniotiman
Master III
Master III

May be

Date(Date#(BillingDate,'DD-MMM-YY hh:mm:ss'),'DD-MM-YYYY')as BDT,

smilingjohn
Creator III
Creator III
Author

Hi Antonio

This is not giving any output

its_anandrjs

Try this

Date(Date#(BillingDate,'DD-MMM-YY hh:mm:ss'),'DD-MM-YYYY') as BDT


//Because in your date format is 01-MAY-17 12:45:00


Or


Date(TimeStamp#(BillingDate,'DD-MMM-YY hh:mm:ss'),'DD-MM-YYYY') as BDT

prma7799
Master III
Master III

Try like this

Date(Date#(BillingDate,'DD-MMM-YY hh:mm:ss'),'DD-MM-YYYY') as BDT

smilingjohn
Creator III
Creator III
Author

Hi Stefan ,

THis is working for me , But i dont know if this is the right way please suggest

Timestamp(Timestamp#(left(BillingDate,18),'DD-MMM-YYYY hh.mm.ss'),'DD-MM-YYYY') as BDT,

smilingjohn
Creator III
Creator III
Author

I tried all the expression that were suggested but none gives any output

ONly this is working


Timestamp(Timestamp#(left(BillingDate,18),'DD-MMM-YYYY hh.mm.ss'),'DD-MM-YYYY') as BDT,



Should  I go ahead with this

its_anandrjs

John,

Another way with the Left function and then convert to pure date

Date(Date#(Left(DStr,9),'DD-MMM-YY'),'DD-MM-YYYY') as NewDStr