Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to convert Wednesday, April 01, 2015 12:00:AM to timestamp as dd/mm/yy hh:mm:ss

How Can convert  "Wednesday, April 01, 2015  12:00:AM" to timestamp as dd/mm/yy hh:mm:ss i.e. 01/04/2015 00:00:00

6 Replies
PrashantSangle

Hi,

Use timestamp(timestamp#(DateField,'WWWW, MMM DD, YYYY hh:mm tt'),'DD/MM/YY hh:mm:ss')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
engishfaque
Specialist III
Specialist III

Dear Binod,

Please try this one,

Timestamp(FieldName,'DD/MM/YYYY hh:mm:ss TT') as DateTime

Might be possible, you're facing problem due to UTC time format. If yes, please let me know.

Kind regards,

Ishfaque Ahmed

Not applicable
Author

Tried both none worked

jonathandienst
Partner - Champion III
Partner - Champion III

You need to strip the weekday out. And you have two spaces between the year and the time:

Field MyTimeStamp = 'Wednesday, April 01, 2015  12:00:AM'

                     ^^^^^^^^^^               ^^

Date(Date#(Trim(Mid(MyTimeStamp, Index(MyTimeStamp, ',')+ 1, 100)), 'MMMM DD, YYYY  hh:mm:TT'), 'YYYY/MM/DD hh:mm') As FormattedDateTime

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

Hi, Try:

Timestamp(MakeDate(SubField(DATE_FIELD,' ',4),ApplyMap('Months',SubField(DATE_FIELD,' ',2)),purgechar(SubField(DATE_FIELD,' ',3),','))&' '&Time(Time#(SubField(DATE_FIELD,'  ',2),'hh:mm:tt'),'hh:mm:ss'))

MarcoWedel

Hi,

some similar solution to Jonathan's:

=Timestamp(Timestamp#(Mid('Wednesday, April 01, 2015  12:00:AM',Index('Wednesday, April 01, 2015  12:00:AM',',')+2), 'MMMM DD, YYYY  hh:mm:TT'),'DD/MM/YY hh:mm:ss')

QlikCommunity_Thread_165146_Pic1.JPG

hope it's helpful as well.

regards

Marco