The header format

In WhatsApp, a chat file syntax can differ between devices, OS and language settings, which makes it hard to correctly parse the data for all formats.

The header appears for each message sent in the chat and contains the timestamp and name of the user that sent the message.

See it for yourself and open an exported chat file. You will find that the messages have a similar format like the one below:

15.04.2016, 15:04 - You created group “Sample Group”
06.08.2016, 13:18 - Messages you send to this group are now secured with end-to-end encryption. Tap for more info.
06.08.2016, 13:23 - Ash Ketchum: Hey guys!
06.08.2016, 13:25 - Brock: Hey Ash, good to have a common group!
06.08.2016, 13:30 - Misty: Hey guys! Long time haven't heard anything from you
06.08.2016, 13:45 - Ash Ketchum: Indeed. I think having a whatsapp group nowadays is a good idea
06.08.2016, 14:30 - Misty: Definetly
06.08.2016, 17:25 - Brock: I totally agree
07.08.2016, 11:45 - Prof. Oak: Kids, shall I design a smart poke-ball?

In this example, the header is day.month.year, hour:minutes - username: which corresponds to the header format (a.k.a. hformat) '%d.%m.%y, %H:%M - %name:'. However, in your case it may be slightly different depending on your phone settings.

Check the table below to see the codes for each header format unit:

header format units
Date unit code Description
'%y' Year
'%m' Month of the year (1-12)
'%d' Day of the month (1-31)
'%H' Hour 24h-clock (0-23)
'%P' Hour 12h-clock (1-12)
'%M' Minutes (0-60)
'%S' Seconds (0-60)
'%name' Name of user

See also

Loading chat using hformat