How to create a date object from string consisting of Hour, Minute, Date, Month and Year?

rohanharikr

I need to convert a string eg: "6 Aug 2020 23:40" to a date object which I can then use to convert to ISO. I am aware of the Date.parse() and new Date() but could not find for this particular format.

Steven Penny

Seems to work fine here:

'use strict';
let o = new Date('6 Aug 2020 23:40');
console.log(o);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Make separate columns for Date, Month, year, hour , minute , second from a single column

How do I extract the Hour/Minute from a datetime object and get rid of the Year/Month/Day/Second section?

Is it possible in R to split my date-time values into 5 different columns (Year, month, date, hour, minute)?

Date format for year/month/date'T'/hour/minute/second/timezone in Python

How to convert string to DateTime object with month name, Date and Year flutter?

Create string of month year in order by date

How to create date from year, month and day in pyspark

How to get year/month/day from a date object?

How to get a Date object from year,month and day?

How to group date object by hour/6 hours /day/week/month/year in javascript

javascript create date from year, month, day

Create date from year, month and day

How to get day,month,year from String date?

How to split a string date(from Database) into year, month and day

Javascript, Time and Date: Getting the current minute, hour, day, week, month, year of a given millisecond time

Javascript new date from month and year string

How to filter a dataframe with range having partitions as year, month, date and hour?

How to get the date with specific hour and minute of today from "HH:mm" string in Objecive-C

How to get month and year from date

How to extract the Day, Month and Year from the date?

How to get month and year from date in SQL

Get date, month and year value from Date string

How to create a date object from string in javascript

Month Year In String to Local Date

extracting day, week, hour,date,year in pyspark from a string column

How to create start and end date from a year string

How to extract date , month and year from the date we pass to javascript?

Extracting year, month, day, hour and minute from the current datetime

Create a new column in MySQL into year and month string using a date column