ben03 0 Posted March 28, 2019 Report Share Posted March 28, 2019 Hi there, I am new to Javascript, and finding displaying date and time confusing. I am using new Date().toLocaleString() ...which is perfect, however I am trying to remove seconds on the end as these are not relevant. How do I achieve this? Thanks Quote Link to post Share on other sites
justsomeguy 1,135 Posted March 28, 2019 Report Share Posted March 28, 2019 You can use the various get methods of the Date object to return the various parts and put them together however you'd like: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date Quote Link to post Share on other sites
ben03 0 Posted March 29, 2019 Author Report Share Posted March 29, 2019 Thanks justsomeguy 👍 Quote Link to post Share on other sites
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.