Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

timedate stamp convert to only mm/dd/yyyy

I am using the direct connect and need to convert a timedate stamp to be only date below is a copy of what I have

HRxs.InitReview as 'DateRange',

1 Solution

Accepted Solutions
MarcoWedel

hrxs:

LOAD *,
          DayName(HRxs.InitReview) as DateRange;

SQL

Select HRxs.eRxMsgID,
          HRxs.FacID,
          HRxs.InitReview,

          HRxs.NewRx,
          HRxs.PackBy,
          HRxs.Packed
FROM Rx.dbo.HRxs

regards

Marco

View solution in original post

6 Replies
Clever_Anjos
Employee
Employee

Try

Date(Floor(HRxs.InitReview,'MM/DD/YYYY')) as 'DateRange',

Not applicable
Author

The following error occurred:

ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: The floor function requires 1 argument(s).

Date(Floor(HRxs.InitReview,'MM/DD/YYYY')) as 'DateRange'

after removing the floor

Connected

The following error occurred:

ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: 'Date' is not a recognized built-in function name.

MarcoWedel

Use preceding load:

LOAD DayName(HRxs.InitReview) as DateRange;

SQL Select HRxs.InitReview

FROM YourDB;

hope this helps

regards

Marco

Not applicable
Author

hrxs:

LOAD *;
SQL SELECT
,
HRxs.eRxMsgID,
HRxs.FacID,
HRxs.InitReview as DateRange,

HRxs.NewRx,
HRxs.PackBy,
HRxs.Packed,

LOAD
DayName(HRxs.InitReview) as DateRange;
SQL Select HRxs.InitReview 
FROM Rx.dbo.HRxs

MarcoWedel

hrxs:

LOAD *,
          DayName(HRxs.InitReview) as DateRange;

SQL

Select HRxs.eRxMsgID,
          HRxs.FacID,
          HRxs.InitReview,

          HRxs.NewRx,
          HRxs.PackBy,
          HRxs.Packed
FROM Rx.dbo.HRxs

regards

Marco

Clever_Anjos
Employee
Employee

It´s supposed to be at Qlik scope

LOAD *,

Date(Floor(HRxs.InitReview,'MM/DD/YYYY')) as 'DateRange';

SQL

yourquery goes here