I have a csv file with some columns, like date and time. The date is a 10 digit format, unix format from what i read online.
examples are: 1567285228,1567285348, 1567371053.I found that I can use the formula: =(((A2/60)/60)/24)+DATE(1970,1,1) to calculate the proper date from the code, but the problem is that my csv is for one entire month, the codes are different, but the proper date gives me only 2 values: 01 sept 2019 and 31 aug 2019.
How can I find the REAL dates, for the WHOLE month?
Also, the time when the measurements are taken are for example: 712980, 713040
,713100,713160, but when i use excel to format the time stamp to proper time, it only shows me 12 AM. How can I calculate the proper dates and time, so that I can analyse the data from the csv?
Related
How can I convert this string:
Tue Jan 24 14:59:20 BRT 2017.
Into a date that includes day month year and time and timezone, using Excel functions only.
I have several cells with dates following this format. I have to compute the difference between some of these dates in minutes. I believe that the first step is converting the date to a String to a real date information. Then, I will be able to: order the dates and compute the time between consecutive dates.
Use this formula:
=--(SUBSTITUTE(MID(A1,5,LEN(A1)),"BRT",""))
Then format it to the format you want.
It will now work in math equations.
I have thousands of timestamps in the form shown:
Sun Jul 02 06:00:02 2017 (GMT-04:00)
With Date, Day, and Time all varying. This is a military time stamp ( ie each day counts up to 24 hours)
I have used the following formula to get just the time. But it's not readable by excel.
=MID($A2,FIND(":",$A2)-2,8)
This results in a value like:
06:00:02
However, this does not help and I have to do much manipulation. I want excel to recognize the date and time so i have a true timeline on my x-axis.
I'd like to get it in the form of
7/2/2017 6:00:02 AM
This way I can have a graph that appears like the following:
Graph Example with desired timeline on x axis
Cheers!!!!
Since the weekday and the month are all in three letter abbreviations, you can use the Mid function with an absolute position to extract elements of the date. For just the date you could use
=DATEVALUE(MID(A1,9,2)&"-"&MID(A1,5,3)&"-"&MID(A1,21,4))
For just the time value, you could use
=TIMEVALUE(MID(A1,12,8))
To get the date and time in one value, just add the two and format as you want to see it.
=DATEVALUE(MID(A1,9,2)&"-"&MID(A1,5,3)&"-"&MID(A1,21,4))+TIMEVALUE(MID(A1,12,8))
I did a paste special of date column as values in excel. I want to convert the resulted long values back to dates in spark (using scala api).
Example: converting 41088.96389 to date in excel results in 6/29/16 23:08
same when did through cast(DataTypes.TimestampType) in spark, it gives 01 Jan 1970 11:24:48 GMT
Any links to how excel handles long type when converting to date will be appreciated.
Excel's number is the amount of days elapsed since 1st of January, 1900.
DateTime or Date usually accepts a UNIX epoch timestamp, which is the number of milliseconds (or sometimes seconds, depends on the implementation) elapsed since the 1st of January, 1970.
Converting between the two is not so easy, since you have to count for leap years, and maybe even time zones.
You can find multiple implementations for this in different languages, maybe you can port one of those:
https://gist.github.com/peter216/6361201
https://gist.github.com/christopherscott/2782634
Or maybe just try to normalize the Excel output if you have access to the sheet:
https://stackoverflow.com/a/11140924/1395437
I have multiple rows of datetime data.
For eg:
1/10/2014 10:10
2/3/2015 00:03
12/3/2015 12:03
4/3/2015 08:03
2/3/2015 14:03
6/3/2015 22:03
29/03/15 08:03:40
20/03/15 19:03:25
The first 6 rows seems to have been recognized as DateTime by Excel, whereas the 7th and 8th row seem to be in text format.
I'm not able to perform any datetime calculations on it.
I tried Text to Column, but that doesn't give me the option to keep the Date and Time together.
Please advise.
Use the Text to Columns tool and let the data be split into two columns. In step 3 define the date order as DMY (the order that the source data is in).
Then create a new column where you add the Date and time to get everything back into one column again. Copy, paste values, delete individual date and time columns.
If you cannot change the localization on your PC (or don't want to because it will mess up other things), you can always import this as text and then coerce the data into a date/time based on the known format. I don't know of any date parse function in Excel, so you may have to do it the brute force way:
=DATE(MID(A1,7,2)+2000,MID(A1,4,2),LEFT(A1,2))+TIMEVALUE(RIGHT(A1,8))
Because you have multiple formats on your input, you may actually be forced into this. If you want it to work universally on all dates, a UDF would probably be a good idea.
Excel parsed your date as:
mm/dd/yyyy hh:mm
as Excel Default. You can possibly overwrite that by trying what Teylyn have posted.
For example your 1st date: 1/10/2014 10:10 is interpreted as January 10, 2014 and not October 1, 2014.
What you need to do is identify and standardized your date format first.
Once you've done that, we can help you how to move forward in getting your dates correctly on the cells.
I am trying to figure out if this is an Excel bug or just a formatting issue. So I have a column with a date and time in the format m/d/yyy h:m AM/PM (ie. 10/21/2015 2:21:00 PM), and am trying to split it into two individual columns: one with the date and one with the time. I tried using fixed width first, but ended up using delimited just so I could split it exactly where I wanted.
For some reason when it splits the two up, the actual value for time changes. I will end up with one column with the date and a time of 12am (10/21/2015 12:00 AM) and one column with the initial time minus 12 hours (2:21:00 AM).... Trying to figure out why there is still a time value in the date column and why the time value changes. Ideally I want to have a column with 10/21/2015 and another with 2:21:00 PM.
I've tried changing the format of the initial date/time combination etc. and it keeps on subtracting 12 hours from the initial time when it splits.
Has anybody experienced or heard of similar issues?
I think your question is confusing, for example I tried using fixed width first, but ended up using delimited just so I could split it exactly where I wanted. seems back-to-front, but you have a datetime value for October 21, 2015 14:21 hrs, want that as a date in one column and 02:21:00 PM in the next and your environment is UK style (ie day before month).
IF so Text to Columns may be as confusing as helpful. Format the date column as date (to suit) and the time column as hh:mm:ss AM/PM (or similar) and the following formulae may suit, assuming your datetime value is in A1:
For date: =INT(A1)
For time: =MOD(A1,1)