Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to remove the time stamp from a date field in the script??

Hi all,

Can someone help me how to remove the time stamp from the date field in the script.

I googled and tried out

Date(Floor(TimeStamp#(Value, 'DD/MM/YYYY hh:mm:ss')))  but this does not work.

my script is like following:

LOAD Month as Date,

      YearStart(Month) as date_,

    Monthstart(Month) as pricing_beg_date,

     Monthend(Month)   as expiry_date,

     Style,

     [Expiry date]

     FROM

C:\Hards_Arvis\COMMON\abc.xlsx

so here Month is my date field but it has timestamp hence when I am calculating my rest of the derived fields I dont get exact values.I actually want the timestamp to be zero since I want to calculate only the date part.Can some one please help me out???

regards,

sahana

1 Solution

Accepted Solutions
Not applicable
Author

Try like this.

load YearStart(Month) as date_, MonthStart(Month) as pricing_beg_date, Monthend(Month) as expiry_date, *;

load Date(floor(Date)) as Month,

       ...

from

...;

View solution in original post

4 Replies
Not applicable
Author

Try like this.

load YearStart(Month) as date_, MonthStart(Month) as pricing_beg_date, Monthend(Month) as expiry_date, *;

load Date(floor(Date)) as Month,

       ...

from

...;

View solution in original post

Not applicable
Author

Hi Sahana

This should work

Date(DayStart(Timestamp#),'MM/DD/YYYY')

Sokkorn
Master
Master

Hi Sahana,

If your "Month" is DateTime data type, then MonthStart(Floor(Month)) should work.

If your "Month" is string data type, then MonthStart(Floor(Date#(Month,'dd/MM/yyyy hh:mm:ss')))

Regards,

Sokkorn

Not applicable
Author

thanku all for your valuable response