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: 4
  • test2.JPG
    test2.JPG
    24.9 KB · Views: 4

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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
 
Upvote 0
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")
 
Upvote 0

Forum statistics

Threads
1,214,426
Messages
6,119,417
Members
448,895
Latest member
omarahmed1

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