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

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
mm should work because of månad
weird,
maybe upper case will work?
 

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Endered5

New Member
Joined
Oct 3, 2020
Messages
25
Office Version
  1. 2016
I mean, i have two cells A1 and B1. A1 contains 2020-11-17 as general. B1 contains 2020-11-17 as date. Let's say that's the input, and the output I need is that I want both as general. It's a small step of a bigger problem, but difficult to describe in words.
mm should work because of månad
weird,
maybe upper case will work?
Even this is wierd

1605645317311.png
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
check system date format

17/11/2020=TEXT(TODAY(),"dd/mm/yyyy")
2020/17/11=TEXT(TODAY(),"yyyy/dd/mm")
11/17/2020=TEXT(TODAY(),"mm/dd/yyyy")
2020/11/17=TEXT(TODAY(),"yyyy/mm/dd")
 

Watch MrExcel Video

Forum statistics

Threads
1,123,453
Messages
5,601,755
Members
414,471
Latest member
cchunyadi

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