This article explains how to know the date and time of the last access of your contact on WhatsApp.
Steps
Method 1 of 2: iPhone

Step 1. Open WhatsApp
The icon looks like a white telephone handset in a green dialogue bubble.

Step 2. Tap Chat
The icon looks like two speech bubbles and is located at the bottom of the screen.
If you have a conversation open, first tap the arrow in the top left to go back

Step 3. Tap a specific conversation
Group conversations don't show attendees last accessed

Step 4. View the date and time
Once the conversation has been uploaded, "last accessed (date) at (time)" will appear under the contact's name (at the top of the screen). This is the moment when the user last logged into WhatsApp using their device.
If the word "Online" appears under the contact name, then they have WhatsApp open on their device right now
Method 2 of 2: Android

Step 1. Open WhatsApp
The icon looks like a white telephone handset in a green dialogue bubble.

Step 2. Tap the Chat tab at the top of the screen
If you have a conversation open, first tap the arrow in the top left to go back

Step 3. Select a user by tapping their name

Step 4. View the date and time
Under the contact name (at the top of the screen) will appear: "last accessed (date) at (time)". This is the moment when the user last logged into WhatsApp using their device.