ChrisTERiS Posted January 17, 2021 Share Posted January 17, 2021 Hello all, I wonder if there is any system function to format a timestamp value to system setting date. I've did this task with my own code but is a long piece of code and I want to use (as possible) standard WHMCS syntax. Thank you Chris 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 17, 2021 Share Posted January 17, 2021 3 minutes ago, WHMUp said: I wonder if there is any system function to format a timestamp value to system setting date. https://developers.whmcs.com/advanced/date-functions/ 0 Quote Link to comment Share on other sites More sharing options...
ChrisTERiS Posted January 17, 2021 Author Share Posted January 17, 2021 (edited) 17 minutes ago, brian! said: https://developers.whmcs.com/advanced/date-functions/ Thank you so much !! ..... Works on the meaning that it shows the date, but don't know if my setup is correct. My settings are: The code is: $blog["postdate"] = fromMySQLDate($decodedata[$key]["postdate"], $includeTime, $applyClientDateFormat); And the result is this: While I want something like this: Is this possible? PS: Sunday, January 17, 2021 Edited January 17, 2021 by WHMUp 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 17, 2021 Share Posted January 17, 2021 bear in mind that $includeTime and $applyClientDateFormat are meant to be replaced by boolean flags, e.g they are going to be true or false, so I think your code should really be... $blog["postdate"] = fromMySQLDate($decodedata[$key]["postdate"],true,true); if you don't want to include the time in the output, it would be false, true. 1 Quote Link to comment Share on other sites More sharing options...
ChrisTERiS Posted January 17, 2021 Author Share Posted January 17, 2021 (edited) @brian! AWESOME !! Only the Sunday is missing, but is not important. Also thank you for teaching me that "Bear in mind". I use to say "Keep in mind", but for sure you know better 🙂 PS: With some page refreshes "Sunday" appeared in the date format, so everything is fine. Edited January 17, 2021 by WHMUp 0 Quote Link to comment Share on other sites More sharing options...
bear Posted January 17, 2021 Share Posted January 17, 2021 2 hours ago, WHMUp said: teaching me that "Bear in mind" Someone thinking of me? oh... 1 Quote Link to comment Share on other sites More sharing options...
ChrisTERiS Posted January 17, 2021 Author Share Posted January 17, 2021 4 minutes ago, bear said: Someone thinking of me? oh... For decades I avoid to speak the world "beatch" to avoid ...misunderstandings 🤪 Most probably I'll have the same with "Bear". I can bet that in most cases I'll write "Beer in mind" 🙂 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 18, 2021 Share Posted January 18, 2021 21 hours ago, WHMUp said: Also thank you for teaching me that "Bear in mind". I use to say "Keep in mind", but for sure you know better 🙂 I could have just said "remember" instead. 🙂 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.