Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Get from Date only date without time

I want to get date without time.
I have in sql server Date type.
I try to get: liObj.innerText = shi.Date; in javascript
but I get: 2022-01-22T00:00:00
How I can remove the: T00:00:00
Thank you

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

let var1 = '2022-01-22T00:00:00'

let output = var1.split('T')[0]
    console.log(output)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading