Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to remove AM or PM from time

How Can I remove AM or PM from Time ?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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;

View solution in original post

7 Replies
ankur_abhishek
Contributor III
Contributor III

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 

Anonymous
Not applicable
Author

Brother I want to Remove not replace

ankur_abhishek
Contributor III
Contributor III

Hi Momim

This will remove your AM & PM from time field  .

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

tomasz_tru
Specialist
Specialist

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

Tomasz

kusumanchir
Creator
Creator

Hi Momin,

Please try this,

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

Anonymous
Not applicable
Author

Thanks

Anonymous
Not applicable
Author

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;