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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Date text Change

Hello,

I need to change monday 15th february 2016 to this 15-02-16.

Pls help!

Thanks!

17 Replies
psankepalli
Partner - Creator III
Partner - Creator III

Sorry Attachment missing

Kushal_Chawda

date(date#(purgechar(SubField(InputDate,' ',2),'th') &'-'& mid(InputDate,Index(InputDate,' ',2)+1),'DD-MMMM YYYY'),'DD-MM-YYYY') as Date


pgalvezt
Specialist
Specialist
Author

Hello!

Thanks for your replying I think the trouble is the long of data. I cant reach the information with your code in my app.

I attached a sample where i will try to explain the situation in my languague.

Thanks!

Kushal_Chawda

Yes, Code will remain the same. Just apply the above logic with your data and see

pgalvezt
Specialist
Specialist
Author

Kush,

I put your cod into my sample qv, Question: I have to edit just the numbers? Date field show nothing...

settu_periasamy
Master III
Master III

Hi,

Try this

Date(Date#(replace(SubField('$(Fecha Inicio)',', ',-1),' de ',' '),'DD MMMM YYYY'),'DD_MM_YYYY') as [Fecha Inicio],
Date(Date#(replace(SubField('$(Fecha Termino)',', ',-1),' de ',' '),'DD MMMM YYYY'),'DD_MM_YYYY') as [Fecha Termino]

Read Excel and sort the data

Edit:

Environment variables should be in your format..

SET DateFormat='DD-MM-YYYY';
SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';
SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';

SET DayNames='lun;mar;mié;jue;vie;sáb;dom';

pgalvezt
Specialist
Specialist
Author

Thanks Guys!

Kushal_Chawda

I think in your case try like this

date(date#(SubField('$(Fecha Inicio)',' ',2)&'-'& SubField('$(Fecha Inicio)',' ',4)&'-'& SubField('$(Fecha Inicio)',' ',6),'DD-MMMM-YYYY'),'DD-MM-YYYY') as Date,