Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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,
May be
Date(Date#(BillingDate,'DD-MMM-YY hh:mm:ss'),'DD-MM-YYYY')as BDT,
Hi Antonio
This is not giving any output
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
Try like this
Date(Date#(BillingDate,'DD-MMM-YY hh:mm:ss'),'DD-MM-YYYY') as BDT
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,
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
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