How to change MM/DD/YYYY to DD/MM/YYYY - google-sheets

I have imported a CSV file to the spreadsheet that includes columns with Dates and timestamp (Columns D,E,K,L) and I'm currently facing 2 problems with these columns.
Some rows are formatted as text/string and I can't seem to change it to date format. I tried manually changing it via format>number>datetime but it remains the same.
the format of the date is being read incorrectly by spreadsheet. For example, 5/11/2018 is being read as May 11, 2019 but if you try to review the spreadsheet, it should be read as November 5, 2018. I tried playing with the format and spreadsheet settings to no avail.
Spreadsheet Sample
I'd appreciate any inputs.
UPDATE
For Column D & E, I have already converted all rows to Date but the problem persists where in some rows are being read as DD/MM/YYYY and some rows MM/DD/YYYY. This creates date discrepancy when I try to make data visualization using these data:(
I am unable to convert all rows in Column L to date format. Some rows are still being read as text/string.

if you have a spare column you can use this formula to correct it:
=DATE(RIGHT(A1; 4); MID(A1; 4; 2); LEFT(A1; 2))
also, you can try to change locale settings in your spreadsheet because it looks like that your spreadsheet uses mm/dd/yyyy format as default. eg. you can try for example Czech locale where default is dd/mm/yyyy

To format custom dates in Google Sheets:
Highlight the column to be formatted.
Navigate the app's menu path:
Format >> Number >> More Formats >> More data and time formats
Put your cursor in the top field of the popup and edit as necessary...
Delete parts you don't want.
Add parts you do want (but make sure you're adding them left-to-right).
Put character(s) between the fields as separators.
Format each part via its dropdown list of options.
Click the "Apply" button, and you're done.

Related

Google sheets not recognising a date as a date

On this report I am trying to do some date analysis.
In column G I need to pull all the URLs from column A which have a closing date in the next 7 days.
And in column I, I need all the URLs which the closing date is in the past.
The issue is that when I try to reference the Closing dates in column E it does not read and as such work.
Could I get some help on making sheets read Column E properly and also some help on the formulas I need in Column G and I
Thank you
You might want to look at the DATEVALUE function:
=DATEVALUE(D2)
If cell D2 contains a date in the form of text (such as "26 May 2022"), this formula will return the date as a number. (You can then format the cell to display a particular date format if required.)
For URLs which have ended, you can then do:
=F2 < TODAY()
And for URLs ending in the next 7 days you will need something like:
=IF(F2<TODAY(), FALSE, IF(F2 - TODAY() > 7, FALSE, TRUE))

Convert string date from UTC to AEST

I'm importing submissions from a DUDA contact form into google sheets but the time stamp is coming across as a string in the wrong time zone (2020-11-16 23:26:29 UTC). As I can't change the form settings to convert the time zone automatically, is there a formula that I can use to do this every time a new submission is saved to the spreadsheet?
It's not clear from your post where (i.e., in which sheet or column) your incoming data is. However, it is best practice never to add anything to a form-intake sheet. Rather, you should do manipulations in another sheet (even if you wind up hiding that sheet from view afterward), and then reference that conversion sheet elsewhere.
That said, supposing that your form-intake sheet is named "Form Reponses 1" and that your UTC dates are coming in as text into A2:A, you can try this formula in cell 1 of an otherwise empty column in another sheet:
=ArrayFormula({"Header"; IF('Form Reponses 1'!A2:A="",, DATEVALUE(REGEXEXTRACT('Form Reponses 1'!A2:A,"^(.+) ")) + TIMEVALUE(REGEXEXTRACT('Form Reponses 1'!A2:A," (.+) ")) + (10/24) )})
You can replace "Header" with a more meaningful header.
The results will likely come across as numbers in the 40,000 range with an extended decimal amount. This is the raw date/time format. Just set Format > Number for the column to whatever data/time format you prefer.

ArrayFormula displays dates improperly. How can I fix this?

Form Responses 1 looks like this: 6/1/2020 13:59:11
On my second sheet, it turns it into this: 43983.582763588
This is the formula I'm using:
=ArrayFormula(('Form Responses 1'!A2:A&" "))
What's going on here?! :| Please help. I've tried converting to plain text on Response Sheet 1 and it fixed it temporarily. However, new entries still turn into the weird format.
Answer:
Days are stored in Google Sheets as the number of days since 1st January 1900. You just need to change your Sheet's display format and remove the &" ".
Fix:
Change your formula to the following:
=ArrayFormula(TO_DATE('Form Responses 1'!A2:A))
Then, highlight the column for which this Arrayformula will enter data, follow the Format > Number > More formats > More date and time formats and fill out the opened modal to look like this:
Using the dropdown arrow on the right (v) to select each of the Month/Day/Year Hour:Minute:Second elements you like.
Afterwards your dates should look like this:

Why does a different result show up when filtering a date in google sheets?

I'm very new to programming so I'm not sure how to phrase this but in google sheets, I'm having a problem:
when filtering results using =IFERROR(FILTER('Segment Management'!B:B,'Segment Management'!A:A=B5)), it works perfectly fine with letters and numbers but when there's a date in Segment Management cell B5 it instead of saying the date (in this case 15/3/2020) it outputs "43906". Could I get some help to explain why it says this number instead of the date?
Date is considered as plain number in google sheets that's the reason you get numbers instead of date you can either do either of one
Select the column where you have put formula & in menu Format> Number> and select date formatting
OR
use this formula =ARRAYFORMULA(TEXT(FILTER('Segment Management'!B:B,'Segment Management'!A:A=B5),"DD/MM/YYYY"))

Date converted to plain text in google spreadsheet

I use importdata() to grab a legacy file and use it in a spreadsheet.
This file contains date's in the yyyymmdd format (i.e. 20150520)
I wish to filter out dates what contain a certain date, so when I type in a cell "20150520") it work fine, but when I calculate or copy the date from another cell, the filter don't work anymore
=filter(import!A1:E77;import!C1:C77=G31)
G31 ="20150520" works fine
G31 =TODAY() #N/A
G31 =text(TODAY();"yyyymmdd") #N/A
How can I compose cell 31, in a way the filter will work
(sheet 'import' has imported data with dates like 20150520(
Your legacy file may be formatting it as a number, in which case you need to change your G31 to a number as well. Try
=Int(Text(Today(),"yyyymmdd"))

Resources