How to change datetime to yyyy-mm-dd h:s
See original GitHub issuei want to change datetime format with ‘yyyy-mm-dd h:s’
int date.extensions.js i changed
mask: "1/2/y h:s", placeholder: "dd/mm/yyyy hh:mm", alias: "dd/mm/yyyy",
to
mask: "y-1-2 h:s", placeholder: "yyyy-mm-dd hh:mm", leapday: "-02-29", separator: "-", alias: "yyyy/mm/dd",
then input “2021-02-dd hh:mm”, the dd not works
Issue Analytics
- State:
- Created 9 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
SQL Convert Date to YYYYMMDD
Now, convert the Character format 'yyyymmdd' to a Date and DateTime data type using CAST and CONVERT. --A. Cast and Convert datatype DATE: ......
Read more >Convert DateTime to string "yyyy-mm-dd" - Stack Overflow
Use DateTime.Now.ToString("yyyy-MM-dd"); to convert datetime to string. – Alessandro D'Andria.
Read more >Pandas: How to Convert Date to YYYYMMDD Format - Statology
However, we can use the to_datetime() function anyway to ensure that a given column has a class of datetime before applying a YYYYMMDD...
Read more >Convert datetime string to YYYY-MM-DD-HH:MM:SS format in ...
In this article, we are going to convert the DateTime string into the %Y-%m-%d-%H:%M:%S format. For this task strptime() and strftime() ...
Read more >Moment.js | Home
Format Dates. moment().format('MMMM Do YYYY, h:mm:ss a'); // December 29th 2022, 10:00:05 am ; Relative Time. moment("20111031", "YYYYMMDD").fromNow(); // 11 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@RobinHerbots “h:s” part is not editable in input field in your fiddle example. Could you hint how to fix that?
@denis-chmel @buttflattery I tried some examples and i got some configs that work with date and time validation. My fiddle:
$('input').inputmask({ mask: "y-2-1 h:s", placeholder: "yyyy-mm-dd hh:mm", separator: "-", alias: "datetime" });