ahmetozay Posted June 7, 2019 Share Posted June 7, 2019 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 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 8, 2019 Share Posted June 8, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
ahmetozay Posted June 8, 2019 Author Share Posted June 8, 2019 Thank you for detailed explanation, i suppose writing clientadd hook would be the best choice for the customers in the future. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.