Turn date into text string

Endered5

New Member
Joined
Oct 3, 2020
Messages
25
Office Version
  1. 2016
So I want to store a date format, in this case its Swedish format "2020-11-17" as a text. This is 2020-11-17 when I have it as date format, see picture. However, when I click on General format, it becomes 44152. How is it possible to store 2020-11-17 as a general text?

I tried
Left(cell; 10) in order to get the whole 2020-11-17, but apparently it takes the 44152.

Any VBA code that could solve my problem? Any workaround?
 

Attachments

  • Test1.JPG
    Test1.JPG
    27.3 KB · Views: 2
  • test2.JPG
    test2.JPG
    24.9 KB · Views: 2

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
53,029
Office Version
  1. 365
Platform
  1. Windows
It's best to keep dates as dates, rather than text. However if you want them as text just format the cell as text & then insert the date.
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499

ADVERTISEMENT

in swedish year is Å
 

Endered5

New Member
Joined
Oct 3, 2020
Messages
25
Office Version
  1. 2016
It's best to keep dates as dates, rather than text. However if you want them as text just format the cell as text & then insert the date.
Yes, but in this occasion I unfortunately have one cell as general (2020-11-17) and the other as date (2020-11-17 but gives 44152 as general). I can't format the cells as text and then insert the date,

Is there any way or workaround?
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
but system date is swedish
i see formula but don't see the result of this formula
and not 3 x å but åååå (4)
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,122,755
Messages
5,597,929
Members
414,193
Latest member
bb60

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
Top