Jump to content

Client created date and time


Recommended Posts

hi, i have been struggling for 2 days trying to understand, when i add a client via admin page, in tblclients table created_at column is only showing 0000-00-00 00:00:00 all zeros, also updated_at shows all zeros too, the thing is i need to query each customer's registered date as yyyy-mm-dd hh:mm:ss not just yyyy-mm-dd, please someone let me understand why created_at colum shows always zeros and where can i get client registered date and time with whmcs as 0000-00-00 00:00:00, thanks

Link to comment
Share on other sites

20 hours ago, ahmetozay said:

hi, i have been struggling for 2 days trying to understand, when i add a client via admin page, in tblclients table created_at column is only showing 0000-00-00 00:00:00 all zeros, also updated_at shows all zeros too,

WHMCS uses datecreated to store the signup date value (the date on which their account was created)... though it only stores the date, not the time.

20 hours ago, ahmetozay said:

the thing is i need to query each customer's registered date as yyyy-mm-dd hh:mm:ss not just yyyy-mm-dd, please someone let me understand why created_at column shows always zeros and where can i get client registered date and time with whmcs as 0000-00-00 00:00:00

if tblclients doesn't store the time an account is created, then you will have to try and find that information elsewhere - tblemails might be one option because when an account is created, a welcome email is usually sent (unless email template is disabled, or option unchecked during admin order) to the client... and the date AND time of that email is stored in tblemails - so that should just be a simple query to do as you know the userid of the client, and the subject of the welcome email and just take the first occurrence of it.

alternatively, you could write a ClientAdd hook that will store both date and time somewhere in the database when an account is created (either by admin or client) and you can then use that for your queries - though that wouldn't help with existing clients where the time of registration hasn't been stored.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated