Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

date(date#()) function

Hi,

Can any one help me =date(date#(Date,'DD/MM/YYYY'))  how this works.My date formate is 28/2/2015.when i apply this function it gives 2/28/2015.

Thanks,

1 Solution

Accepted Solutions
Highlighted
Creator III
Creator III

Re: date(date#()) function

Date#() is used how to interpret the data.  For example

date#('2013_24_10','YYYY_DD_MM') tells that the first four digits are year, the digits between two '_'s are Date, and the last two are Month.

Date() is used to tell how to show the data.  For example

date(today(),'YYYY_DD_MM') returns  2013_24_10

date(today(),'MM/DD/YY') returns  10/24/13

Combination of both:

date(date#('2013_24_10','YYYY_DD_MM'),'MM/DD/YYYY') returns 10/24/2013

Also refer the attached files

View solution in original post

5 Replies
Highlighted
Master III
Master III

Re: date(date#()) function

Hi,

Check below:

The Date Function

Thanks,
AS

Highlighted
Not applicable

Re: date(date#()) function

hi,

If you will use date function without specifier it will always give answer(MM/DD/YYYY).

if you want in your desired format then Date(MDATE,'DD/MM/YYYY).

Regards

Vimlesh

Highlighted
Creator III
Creator III

Re: date(date#()) function

Date#() is used how to interpret the data.  For example

date#('2013_24_10','YYYY_DD_MM') tells that the first four digits are year, the digits between two '_'s are Date, and the last two are Month.

Date() is used to tell how to show the data.  For example

date(today(),'YYYY_DD_MM') returns  2013_24_10

date(today(),'MM/DD/YY') returns  10/24/13

Combination of both:

date(date#('2013_24_10','YYYY_DD_MM'),'MM/DD/YYYY') returns 10/24/2013

Also refer the attached files

View solution in original post

Highlighted
Not applicable

Re: date(date#()) function

Hi chandini,

  Date#() function is called Interpretation function.It will convert the string -to-number format. Date() function is called Formatting function.It will convert number-to-string format.

Normally Qlikview itself as an intelligence to interpret the date function but at times it will failed to interpret the date correctly. During those times we need to use date#() function manually help the qlikview to interpret the date.

                                           Date#('your-date-field','current date_format')

Once the Qlikview is recognized the correct format of date it will map the date to the corresponding number.From that you can use date() function to format the date to any form.

                                          Date(Date#('your-date-field','current date_format'),'required date_format')

Regards

Lathaa

Highlighted
MVP
MVP

Re: date(date#()) function

Hi

date#(string, dateformat) converts a string to a date, optionally using the supplied date format

date() formats a date to the default date format for your system, or optionally the supplied date format.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein