Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

momin_tahemas
Contributor

How to remove AM or PM from time

How Can I remove AM or PM from Time ?

1 Solution

Accepted Solutions
momin_tahemas
Contributor

Re: How to remove AM or PM from time

load *,Timestamp#(PurgeChar(StartDate,'AMP'),'DD/MM/YYYY HH:MM') as NewStartDate,

Timestamp#(PurgeChar(EndDate,'AMP'),'DD/MM/YYYY HH:MM') as NewEndDate

Resident Temp;

DROP Table Temp;

7 Replies
ankur_abhishek
New Contributor III

Re: How to remove AM or PM from time

Hi Momin

Use replace function

Replace( Replace(Field name, 'AM', ''),'PM','') or you can use Left function to extract some character of values.

Regards

Ankur 

momin_tahemas
Contributor

Re: How to remove AM or PM from time

Brother I want to Remove not replace

ankur_abhishek
New Contributor III

Re: How to remove AM or PM from time

Hi Momim

This will remove your AM & PM from time field  .

Trim(Replace( Replace(Field name, 'AM', ''),'PM',''))

tomasz_tru
Valued Contributor

Re: How to remove AM or PM from time

Is it a string od timestamp? Try Purgechar(Field, 'PMA')

Tomasz

kusumanchir
Contributor

Re: How to remove AM or PM from time

Hi Momin,

Please try this,

Timestamp(<The timestamp field>,'DD/MM/YYYY hh:mm:ss')

momin_tahemas
Contributor

Re: How to remove AM or PM from time

Thanks

momin_tahemas
Contributor

Re: How to remove AM or PM from time

load *,Timestamp#(PurgeChar(StartDate,'AMP'),'DD/MM/YYYY HH:MM') as NewStartDate,

Timestamp#(PurgeChar(EndDate,'AMP'),'DD/MM/YYYY HH:MM') as NewEndDate

Resident Temp;

DROP Table Temp;