I have date column like this
DEC07
SEP2007
SEP2008
JUN10
JUN09
how can I can convert this into MM/YYYY assuming DEC07 is 12/2007?
With data in A1, in B1 enter:
=MONTH(DATEVALUE("1 " & LEFT(A1,3) & " 2000")) & "/" & IF(LEN(A1)=5,2000+RIGHT(A2,2),RIGHT(A1,4))
and copy down.
The formula will handle both 2-digit years and 4-digit years.
This converts it to an actual date and not a string that looks like a date:
=IF(LEN(A1)=5,--REPLACE(A1,4,0,"20"),--A1)
Then format the cells:
mm/dddd
Related
I'm trying to get the current year/month/day military time in a cell. This is exactly what I need in the cell #Date:2017/AUG/14 14:55:08 I know this is super easy to do but I'm just not getting the result that I want. This is what I tried.
="#Date"=date(yyyy,MMM,D, hh:mm)
If you're after VBA:
="#Date:" & Format(now(),"yyyy/MMM/D hh:mm:ss")
If you're after a cell formula:
="#Date:" & TEXT(NOW(),"yyyy/MMM/D hh:mm:ss")
Note: Consider DD instead of D if you want day 1 to read 01 instead of 1
Just enter:
=NOW()
in a cell and custom format as "#Date:"yyyy/mmm/dd hh:mm
For a stupid reason the Excel change the format of my data, and converted them to kind of date format. My problem really that I am dealing with a big amont of data so the data looks like this :
Sep.51 where the orginal value is 9,51
Oct.57 orginal value 10,57
Dec.80orginal value 12,8
Nov.44 orginal value 11,44
and even sometimes so :
06.Oct orginal value 10,6
07.Oct orginal value 10,7
so any idea how to change them or even any formula can I apply to make the change for all the data and all colums
If the data does not respond to format changes, it may be text data. With text data in column A, in B1 enter:
=MONTH(DATEVALUE("1 " & LEFT(A1,3) & " 2000")) & "," & RIGHT(A1,2)
and copy down:
at first sort your column A to Z, now separate data which are in shape of ((Sep.51)) to column A and then seprate data which are in shape of ((07.Oct)) to column B.
at this moment try this formula on column C1 and D1 and then scroll it down:
C1=MONTH(DATEVALUE("1 " & LEFT(A1,3) & " 2000")) & "," & RIGHT(A1,2)
D1=MONTH(DATEVALUE("1 " & RIGHT(B1,3) & " 2000")) & "," & LEFT(B1,2)
I have received an Excel file that contains a number of datetime fields in the following "flat" format:
20150901120844
I need to convert this to a more useful value such as "2015-09-01 12:08:44" using Excel's formatting options.
How can I achieve this?
There is no formatting option that will adjust your dates for you, in this case.
But you can use a formula in an adjacent cell to reorganize the data into the date / time text you desire.
Let's say that 20150901120844 is in cell A1. Then in B1 you could enter this formula:
=LEFT(A1,4) & "-"& MID(A1,5,2) & "-"& MID(A1,7,2) & " "& MID(A1,9,2) & ":"& MID(A1,11,2) & ":"& MID(A1,13,2)
It will result in this value in cell B1: 2015-09-01 12:08:44.
How would you change this date type Monday, 31, August2015 at 6:08 AM to short date in Excel 31/08/2015 ?
Currently I use Text to Columns on the top date, find and replace to remove the comma on 31,. Then use a combination of =text(1,"00") and =month(A1&1 to format the numbers correctly and finally =concatenation() to join them all together.
This is time consuming and concatenated dates are in a different format to short date formats. When uploading data the software will see them as such.
I'm hoping there is a really easy way of doing this to save time.
It's a long formula, but it works. Before using it make sure you set the Number Formatting for the formula cell to the short date that you want.
Assuming that your awkward date is in cell A1, enter this formula in another cell:
=DATEVALUE(VALUE(SUBSTITUTE(MID(MID(A1,FIND(" ",A1)+1,99),1,2),",","")) & " " & MID(A1,FIND("|",SUBSTITUTE(A1," ","|",2))+1,3) & " " & MID(A1,FIND("|",SUBSTITUTE(A1," ","|",3))-4,4))
I'm attempting to create a date range in a merged cell with the following:
=(A1-1) & "-" & (A1-6)
So I'm referencing a date that I have in a cell (A1) and subtracting a few days from it. Once I try to do this it returns the following:
41914-41909
I'd like to be able to keep the dates in the following format:
1/1/2014 - 1/7/2014
How would I do this?
You just need to convert the dates to text before trying to concatenate them as a string.
=TEXT(A1-1, "mm/dd/yyyy") & " - " & TEXT(A1-6, "mm/dd/yyyy")
Here's a similar question on StackOverflow: Convert date field into text in Excel. It gives a little more detail if you have any problems.