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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting date format

Hi,

I have the following date format in my system = 01.01.2013

When I import this into Qlikview it comes across as a string like this = 79869598

Any ideas on how to change this a date in Qlikview?

I've used functions date and #date...

Many Thanks

23 Replies
Not applicable
Author

Here is the attached sample

Thanks

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     If you look at the script in your example, the field [GDATU] is coming from your database.

     Which has the values which are not in the date format and thus you are using the below expression to convert into date format

   Date(Left([GDATU], 2) & Mid([GDATU], 4, 2) & Right([GDATU], 4)) as Date,

     So unless the field coming from the database doesnt have the proper date format, qlikview will not be able to convert it.

     Kindly check the same field in your database(SAP)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

The field on my SAP table is in the following format - 01.01.2012

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     But the data which you gave in currtest.qvw file, the field GDATU has some different values.

     Kindly check youe qvw file.

     Try one more thing, instead of storing the data in QVD and then fetching it, directly get the data from Database for just knowing the values of the field GDATU.

    

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Here you go

Thanks

Not applicable
Author

hi try this

Date(Date#('01.01.2013','DD.MM.YYYY'),'DD-MM-YYYY')

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Correct if you see the date field, it is not in the form which you said (01.01.2012) its into something else format.

     So this is not a qlikview issue, you need to check with your database guy to tell you what format SAP is using.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thanks for your help

Not applicable
Author

HI ,

      Can you provide what is the Date in the SAP for the GDATU value:79869598

If you provide what is Date in DB for this value i can make out .

Please reply soon.

//Yusuf

Not applicable
Author

OK...

SAP field - 01.03.2013

Qlikview output - 79869698

Thanks