Change date format on import

namloop

New Member
Joined
Mar 23, 2020
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Good morning

I am importing some data and I am having two different issues in col. B.
In rows 3 this data says Nov-9 (the 9th of November) when I try to change the format it will say November 2009.
Is there any manipulation that can be done to correct this format?

Second issue
In lines 12/13 is a combination of the date January 2, 2021 - I have tried to Concatenate the two but the data then is not seen as a date - is there a better way? - ultimately I need it to read 02-Jan-21.

Many thanks for your assistance in advance.
Stephen

1593036369132.png
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi Stephen,

With regards to the first issue, assuming it is 2019, please try the following formula:
=TEXT(DATE(2019,MONTH(B3),RIGHT(YEAR(B3),2)),"dd-mmm")

With regards to the second issue, try the following formula:
=TEXT(DATE(B13,MONTH(B12),DAY(B12)),"dd-mmm-yy")

Best Regards
M. Yusuf
 
Upvote 0
Hi Stephen,

With regards to the first issue, assuming it is 2019, please try the following formula:
=TEXT(DATE(2019,MONTH(B3),RIGHT(YEAR(B3),2)),"dd-mmm")

With regards to the second issue, try the following formula:
=TEXT(DATE(B13,MONTH(B12),DAY(B12)),"dd-mmm-yy")

Best Regards
M. Yusuf


Mamady
Many thanks for your reply - I got the first string working straight away but having problems with number 2. - Can you reconfirm?
Thank you
Stephen
 
Upvote 0
Hi Stephen,

What is the format of cells B12 and B13? A date, number or a text?

Best Regards
M. Yusuf
 
Upvote 0
In that case, try the following:

=TEXT(DATE(B13,MONTH(DATEVALUE(LEFT(B12,3)&" 1, 2020")),MID(B12,5,1)),"dd-mmm-yy")
 
Upvote 0
format the date to your preference

T202006b.xlsm
BC
12Jan 2
13202102-Jan-21
14
3a
Cell Formulas
RangeFormula
C13C13=DATE(B13,MONTH(1&LEFT(B12,3)),RIGHT(B12,1))
 
Upvote 0
Dave - I tried your suggestion and this is the response
1593384869790.png



This is the suggestion from Mamady from the previous post

1593384957182.png


Any suggestions would be appreciated - thanks again - Stephen
 
Upvote 0
What is your date format? What is the date setting in Windows Regional settings?

What part of the formula is creating the error?

I did not notice the comma; try the following

T202006b.xlsm
BCD
12Jan 2,
13202102-Jan-2102-Jan-21
14
3a
Cell Formulas
RangeFormula
C13C13=DATE(B13,MONTH(1&LEFT(B12,3)),MID(B12,5,1))
D13D13=(B13&"-"&MONTH(1&LEFT(B12,3))&"-"&MID(B12,5,1))+0
 
Upvote 0
Hi Dave

This sheet is imported from an online timetable.
The data in row B says general.
My Windows settings (Australia) is day month year.
The required format will be dd-mmm-yy in the sheet

I did enter your two =text strings into C13 c&d and got a #VALUE! response

I attempted to attach the spreadsheet but realised the forum doesn't allow this.

Thanks again
Stephen
 
Upvote 0

Forum statistics

Threads
1,212,929
Messages
6,110,743
Members
448,295
Latest member
Uzair Tahir Khan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top