Convert Date Value When Using Google Form Date Picker from 5 Digit Format to MM/dd/yyyy format - date

I selected tomorrow's date (8/21/2014) from the data picker field of a Google Form submission, and the value "41872" is returned in the spreadsheet.
What format is this date format?
I need to convert this date format to the MM/dd/yyyy format using script, as formatting the Date column using the Format menu only updates the rows that are currently available...not the new rows that will be there when new form submissions come in.
How do I make this conversion?

I am not sure, but your issue seems to be very basic. Its about the cell formatting as like we do in Ms Excel.
For Google spreadsheet inorder to format a cell or a range,
1. Select the Range
2. On menu, Go To Format->Number->Date (and then select the required format)
Does this works?

I had the same confusion. All you need to do is just change the format from the menu Format->Number->Date & Time

Related

Google sheets won't format time date correctly

My Google Sheets is currently set to UK London GMT
I have some data that is needed in UK format and other data that is needed in US format within the same sheet.
I'm using date time as dd-mm-yyyy hh:mm:ss and have been trying to convert this to US yyyy-mm-dd hh:mm:ss
When formatting the UK date time to as text and using this formula
=ARRAYFORMULA(REGEXREPLACE(A2:A, "(\d{4})-(\d+)-(\d+)", "$3/$2/$1"))
It should be converting for me however is stays the same.
I have also tried simply copying and pasting in a new column with the intention of changing format from within formatting settings but when pasting it seems to randomly select different formats in some rows using / instead of - and in other rows returning a number instead of date time.
How can I get this to work correctly?
try:
=TEXT(A2, "e-m-d h:mm:ss")

change date format in SSRS report dynamically

I am trying in D365 to create a dynamic date format, that is based on the preferences of the user. There is a field "Date, time, and number format" and based on the value of this field, the date format has to be changed. The field on the SSRS report is for some other purposes string, created by some values and one date field, so I would like to ask, if there is any function, that would in a code change the date format based on the user's preferences.
Many thanks for any advice

Google Sheets - Date Format Display Issues

I'm currently building dashboards in Google Sheets and have run into a consistent issue with dates being displayed as a number opposed to a date format. EX: 43626 opposed to 6/11/19.
This data is being pulled from form sheet into a database, then queried into the dashboard spreadsheet where it is coming through as a number sequence opposed to readable date format. Currently have tried to use the DATEVALUE to reformat, as well as attempted to reformat the cell into a date format in both dashboard and database locations, with no luck.
//What I've tried
=TargetCell
43626
=DATEVALUE(TargetCell)
43626
=TargetCell //Reformatted as any Date format
43626
I was expecting the following
=DATEVALUE(TargetCell)
6/11/19
OR:
=TargetCell //Reformatted as any Date format
6/11/19
you got it wrong... function DATEVALUE creates 43626 from 6/11/2019
if you want to reverse it you need to use either:
internal custom date formatting (does not work all the times)
TEXT formula like: =TEXT(43626, "m/d/yy")
QUERY parameter format like: =QUERY(A:B, "format A 'm/d/yy'", 0)
or QUERY parameter toDate like: =QUERY(A:B, "toDate(A)", 0)
https://developers.google.com/chart/interactive/docs/querylanguage#top_of_page

Format to enter a Date in Google Forms

I have a drop-down list of dates I want users of a form to select from. I have tried mm/dd//yy, mm/dd/yyyy, yyyy-mm-dd, yyyy/mm/dd and MMM-DD-YYY, but the data that ends up in the Sheet is always 12/31/1969 (25568.6666666667 if I change the display format). What format can I use to get a date successfully imported?
The answer in this thread didn't work for me: What format is required to import a date into google spreadsheet
The format mm/dd/yyyy works; I had a problem in the naming of the columns of the spreadsheet which was the source of the problem.

Dates in Table are submitted in incorrect regional format

Background Info
I currently have a VBA user form, which submits daily KPIs to an Excel Table in Excel 2010. The Form is setup to put today's date into a text box in the format DD/MM/YYYY (I'm in Australia), then transfer that information to the Excel worksheet when I hit submit. Previously, this process has worked without a hitch, as it is just transferring pure text. But now, the date is being submitted in US format (MM/DD/YYYY). I'm pretty sure the problem is somewhere in Excel, but here is my VBA code anyway:
'First it populates the text box
Private Sub UserForm_Activate()
TextBox1.Text = Format(Now(), "DD/MM/YYYY")
End Sub
'Then it transfers to the spreadsheet
With nwb.Sheets("daily_tracking_dataset_master")
.Cells(emptyRow, 1).Value = TextBox1.Value
Main Problem
Somewhere on the Excel side, the data is now being submitted incorrectly in the US date format, so a submission on the fourth of June, becomes the sixth of April, see image: http://tinypic.com/r/2vslyd5/8/.
When i change the number format to General, it shows that the pure text date from the VBA form has been converted to the April date. I.e. it's not a simple matter of changing the formatting, the date has actually been completely changed:
41789 (30/05/2014)
41789 (30/05/2014)
41789 (30/05/2014)
41735 (06/04/2014)
41735 (06/04/2014)
41735 (06/04/2014)
I have tried several workarounds for this, including:
Highlighting column A and changing the format to Date in the format DD/MM/YY
Selecting Date format under the Home tab -> Number group -> Date drop down box
Checking regional settings in Windows and Excel
I have also tried going into Data -> Data Tools -> Text to columns. Then on step 3 selecting DMY under Date - this seems to be one of the main fixes for the issue I'm having in other forums.
By the nature of the Excel Table, each time my submission form adds a record, the table is extended by one row - I'm not sure whether this would have any influence and the incorrect date settings are generated from the Table somehow?
Any ideas for troubleshooting this would be fantastic.
You need to use CDate when writing back to the cell to convert the text to a real date value so that VBA can't misinterpret it:
.Cells(emptyRow, 1).Value = cdate(TextBox1.Value)