Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7963621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:38:59+00:00 2026-06-04T05:38:59+00:00

I have a mailer to send on reminder stating the clients last login date.

  • 0

I have a mailer to send on reminder stating the clients last login date. My time is saved in unixtimestamp. So when I fetch from the database and include it in the email then it is giving me 6 days before date. What am I doing wrong here?

Part of the data:

$lastlogin = mysql_result($result,$i,"lastlogin");
$newlastlogin = date("d-m-Y", $lastlogin);

Email Body:

 $msg .= "Your Last Activity: $newlastlogin.<BR>";

lastlogin from mysql has date of 27-05-2012

But when the mail goes, then it shows 21-05-2012

By the way, I tried with

$newlastlogin = date("d-m-Y", strtotime($lastlogin));

Any help and advise would be appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:39:00+00:00Added an answer on June 4, 2026 at 5:39 am

    You can convert the date to a Unix TimeStamp directly from the database using
    unix_timestamp(date) on your select statement.

    example: (asuming you have a field named last_login on a logins table)

    $sql = "SELECT UNIX_TIMESTAMP(last_login) as lastlogin from logins";
    

    Details here:
    http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_unix-timestamp

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have downloaded Swift Mailer from their website and try to send simple email
I am using Django-Mailer-2 to send email from a Django App. If I have
I have send an email using php mailer class. mail was sending successfully but
I have a mailer script that is looping, processing outgoing emails from my server.
I am using swift-mailer to send email to user. I have implemented it and
As advised I have tried using PHP Mailer to send email attachments with a
Well this is weird let me describe the scenario I have this mailer define
I am using Swift Mailer to check for bounced messages. I have created one
have written this little class, which generates a UUID every time an object of
I'm using django-registration on my web app. I also already use django-mailer to send

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.