Google SHEET - Timestamp being interpreted as text - How to convert - date

I've a dataset in which the timestamp is in this format 03.01.2019 7:49 and the system interpret it as text.
Is there a formula to convert it to date so to divide the dataset by months (MONTH obviously is giving error in this format)
Trying to pivot the dataset by months

Related

Converting Date Time into standard format

I have data (240 x 9 dimensions) in which a DATETIME column has entries as shown below. I want to separate the date and time parts. Also, I need to calculate the time difference between an entry and a previous one. The date is formatted as yyyymmdd followed by the hhmmsssss. However, the last three entries of the seconds represent the decimal seconds i.e., 36200 means 36.2 seconds
Using MATLAB I have separated the date and time entries as character arrays as the original data was in the double format as below:
datestr: 240 x8 char e.g., '20190101'
timestr: 240 x9 char e.g., '001634200'
I want to convert the date into the standard format. I used
formatOut = 'yyyy/mm/dd';
date=datestr(datenum('20190101','yyyymmdd',1900),formatOut);
But getting this error : Index in position 1 exceeds array bounds (must not exceed 240).
Additionally, I need to convert the time into hh:mm:ss.sss format and then calculate the difference between a time and its previous entry.
Any help will be appreciated.

d3 date/time plotting out by 100 years

Can anyone help a beginner d3'er? I've created a scatter plot using d3 that shows Filing Date (of a Document Family) on the x-axis, and # family Members on the y-axis. Dots are all the same radius and are colour coded by Status. I have 300+ data records in a csv file format and all but the first 4 of them plot perfectly. All dates are post 1900.
Included below are the first 9 lines of the csv data set.(I've used line breaks here to make it a bit more readable). The first 4 records are plotting out at +100 years on their actual date. e.g. 1934 plots as 2034.... but the 3-Nov-75 and the ~300 others all plot as expected. The data came from an Excel spreadsheet, all date cells were formatted the same way, all show the correct 4-digit date year, and none behave as text strings instead of dates. The date display format in Excel was dd-mmm-yy.
Num,Word,FilingDate,Status,Type,FamNum
63872,Word1,23-May-34,Removed,Word,2
69105,Word2,19-Oct-36,Registered,Word,1
175164,Word3,31-Jul-62,Registered,Word,6
207804,Word4,1-Feb-67,Registered,Word,6
291765,Word5,3-Nov-75,Registered,Word,12
381067,Word6,15-Sep-82,Removed,Word,2
381069,Word7,15-Sep-82,Removed,Word,2
402936,Word8,27-Jan-84,Removed,Word,2
410476,Word9,20-Jun-84,Removed,Word,2
I've included the following in the html code, which is working for all but the first 4 records.
// Parse the date/time
var parseDate = d3.time.format("%d-%b-%y").parse;
Does anyone have any suggestions on what may be going haywire?
Thanks.
You will have to hack a little to produce the date you wish.
Instead of using
var parseDate = d3.time.format("%d-%b-%y").parse;
create a new function to parse your date:
var parseDate = function(d){
var last2 = parseInt(d.slice(-2));
var date = d3.time.format("%d-%b-%y").parse(d)
if(last2 < 69){//if year is less than 69 then change the year
date.setFullYear(1900 + last2);//will generate 1900 date
}
return date
}

How to convert unix-epoch to human time in Tableau?

In the Tableau, I have a column containing the timestamps in unix-time format, which I wish to convert it to Human time.
Is it possible to use R script in Calculated Field for such time conversion?
Tableau screenshot
I think you should create a new calculated field like this:
New_date = dateadd('second',[Time],#1970-01-01#)
Or if [Time] is in milliseconds then just divide it by 1000 to convert to seconds before passing it to dateadd of course

Convert Excel date from date serial number to Hijri date

I have a large report data, 30k+ rows in Excel, their are two values which have dates, the dates are in Hijri, 80% of the dates is correct, but a few values appear in date serial number, which is 40383 instead of 1432/8/12, is there any way to convert those back to date, with this format, (yyyy/mm/dd) because I have written another function to calculate dates, and overlapping values, ...
Selection.NumberFormat = "[$-1170000]B2yyyy/mm/dd;#"

Converting a date/math formula in Excel into Numbers for Mac

I have a formula in Excel that subtracts a birth date from today's date and divides by 365 which gives the age in decimal format. Example below.
B4 is equal to birthday of 10/03/2011.
E4 is today's date.
The result is 2.73. My child is a little over 2 and 1/2.
=IF(B4>0,(E$4-B4)/365," ")
When I try to use this formula in Numbers for Mac, it gives me an error about comparing dates with numbers and so. I looked at DatedIF, TimeValue, and DateValue but couldn't figure out how to do it in Number.
Anyone know how I could get this formula to return a decimal value of 2.73 years of age?
Assuming B4 is in "date" format, you could try the following formula
=IF(ISBLANK(B4),"",YEARFRAC(B4,TODAY(),1))
Here is some documentation on YEARFRAC from the horse's mouth
Try entering the formula
=B4>0
in a different cell, you will then encounter en error
You can’t compare a date with a number because their data types are different.