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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Function (03-Jun 06.32)

Hi All,

Is anyone able to help me get this into a date format of:

03/06/2015 06:32

It is currently text in my file.

Thanks in advance

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Thanks for the help, I have solved this by concatenating the day month and year(today()) with the hh:mm to get the full date.

View solution in original post

7 Replies
Not applicable
Author

03-Jun  06.32

is the text I currently have

Colin-Albert
Partner - Champion
Partner - Champion

Does your existing date have a year?

Use Date#() to format the text being input, then wrap a Date() function around this to get the required output format.

If your input date is in a field called DateIn and is formatted as  03-Jun-15  06:32

     Date( Date#(DateIn, 'DD-MMM-YY  hh:mm') , 'DD/MM/YYYY hh:mm')

The text in bold is setting the format of the input date  DateIn.

The rest of the text is setting the output format.


MarcoWedel
MVP
MVP

Hi,

if you don't have a year in your dates and like to use e.g. the current year, then one solution could be:

Timestamp(SetDateYear(Timestamp#('03-Jun 06.32','DD-MMM hh.mm'),Year(Today())))

hope this helps

regards

Marco

MarcoWedel
MVP
MVP

QlikCommunity_Thread_166807_Pic1.JPG

QlikCommunity_Thread_166807_Pic2.JPG

hope this helps

regards

Marco

maxgro
MVP
MVP

maybe

date(

     date#(

          subfield('03-Jun  06.32', '  ', 1) & '-' & year(today()) & ' ' & subfield('03-Jun  06.32', '  ', 2) ,

          'DD-MMM-YYYY hh.mm'),

     'DD/MM/YYYY hh:mm')

in image the intermediate results

starting from subfield (top); I added the year

then date#(subfield..... 

and last date(date#(subfield.... at the bottom

1.png

here for detail on date and date#

Get the Dates Right

Not applicable
Author

Thanks for the help, I have solved this by concatenating the day month and year(today()) with the hh:mm to get the full date.

MarcoWedel
MVP
MVP

Very good.

Please close your thread

Thanks

Regards

Marco