Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

...;

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