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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to change the string format ?

Hi ,

I have a date field(Date) as OBJ_GDN_Date which is coming from excel but when i am loading the date field to qlikview it is displaying as  41729.

Can any one help me how to change it Date format.

Regards,

Sharma.

22 Replies
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Sharma,

These kind of problems can be avoided slightly if you put a QVD layer in your application design right up front.  The theory is that you can then swap out any given QVD with a QVD of data derived from a different source.

What you can do now is to create QVDs from BW that mimic the Excel sheets you already have.  Swapping over in the application is then quite straight forward.

I've written a number of blog posts on data modelling and how to get your application design right.  This one may be useful regarding moving to QVDs:

http://www.quickintelligence.co.uk/qlikview-qvd-files/

Hope that helps,

Steve

Anonymous
Not applicable
Author

Hi steve,

Yes i have been doing 24 qvds. Is there any way i can joing 6 qvds into one big qvd.

And how can i call 2 or more qvds in an other qvw. I heard by using binary only one qvw we can load,.

And also,  i have some excel sheets for last 2 years(24 months) having the same column names, whilst creating qvds i am concatenating all the 24 files as advised in the community but its a long page load script , is there any way we can shorten  that , i come across for each loop but not sure as i am novice to qlikview in writing the script .I need your help in this matter.

Regards,

Sharma.

er_mohit
Master II
Master II

Hi

Please check in data source i.e excel that your date field in which form then read it in qlikview using date # function and then convert it into any format in which you want

suppose in your excel its in DD/MMM/YYYY i.e 17/Oct/2014 format.

So while loading table in qlikview

then

load

Date(Date#(DateField,'DD/MMM/YYYY'),'DD-MM-YYYY') as Date

from datasource ;

So, Output will be

17-10-2014

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Your options for joining data are CONCATENATE and JOIN.   It sounds like for what you are doing - bringing data from different periods - that the concatenate option is definitely best.  Binary loads are probably not something you want to be looking at here.

You certainly can enumerate around a folder of similar files to bring them all in.  Take a look at this post on the subject:

http://www.quickintelligence.co.uk/convert-drop-folder-files-qvd/

It references CSV files, but the process would be pretty much the same for Excel files.

Regards,

Steve

Anonymous
Not applicable
Author


Thank You Mohit ,

I have got it now.

Anonymous
Not applicable
Author

Hi steve,

I have a field called 'Paid in' which stores value 'September' in excel and now i am bringing that field into qlikview and I would like to use makedate function ,My previous developer used the function like this but

its not showing any result  and I need to know what it is trying to do .

Date#(date(Makedate(num(Year),[GS3 Paid in],1))) as OBJ_GSoS_EndDate, 

Can any one help me out this , How can I make it work.

Its a bit urgent pls

Regards,

Sharma.

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

The makedate function takes three numbers and makes it into a date, eg:

makedate(1975,5,28) as MyDate,

If you have the string September you need to make a full string and convert to a date, like this:

Date(Date#('1 ' & [GS3 Paid in] & ' ' & Year, 'DD MMMM YYYY'), 'DD MMM YYYY') as MyDate,

The Date# converts the string to a number and the Date function formats it to make it look better.

Hope that makes sense.

Steve

Anonymous
Not applicable
Author

Hi Steve,

Thanks for your reply even at weekend, much appreciated for your time.

I have tried with the above suggestion but I am getting error as <Year> Field not found.

How shall i solve it. This is bugging me

Regards,

Sharma.

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Sharma,

Apologies, I presumed from your code that Year was one of the fields in your database.  If you don't have the year and you just want to default to the current year you could put this:

Date(Date#('1 ' & [GS3 Paid in] & ' ' & Year(today()), 'DD MMMM YYYY'), 'DD MMM YYYY') as MyDate,


or if you want to fix the year it would be this:


Date(Date#('1 ' & [GS3 Paid in] & ' 2014', 'DD MMMM YYYY'), 'DD MMM YYYY') as MyDate,


or if the year is in a field called The Year, it would be this:


Date(Date#('1 ' & [GS3 Paid in] & ' ' & [The Year], 'DD MMMM YYYY'), 'DD MMM YYYY') as MyDate,


Hope that helps,

Steve

Anonymous
Not applicable
Author

Hi Steve,

I cant help in Thanking you enough, You are the source code for any Qlikview issues.

Wondering if you do take any classes.

Regards,

Sharma.