Formatting dates Coming up with odd values

psulions83

Board Regular
Joined
Nov 16, 2015
Messages
126
Hi All,

I am trying to input dates into a sheet in QTR/YEAR format. Q2 would be 02/2017 and so forth. When I do this I get 0.000991571641051066 as the value. I am going to need to upload these to a database and this value is going to have the wrong output. I used a custom format of 00/0000 and that shows me the correct display but when clicking into the cell I get the long decimal value. Is there a way around this besides inputting the cells different?

Any help is much appreciated! I uploaded an image of the results.
 

Attachments

  • Capture.JPG
    Capture.JPG
    77.4 KB · Views: 7

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
that is probably how it should have been to begin. When I format to that, the date goes to 01/1900
 

Attachments

  • Capture.JPG
    Capture.JPG
    19.3 KB · Views: 3
Upvote 0
that is probably how it should have been to begin. When I format to that, the date goes to 01/1900
01/1900 would be the result if you formatted the number 0.000991571641051066 as "mm/yyyy" . But why would you do that? The raw number for an excel date of 02/2017 is 42767, so if you format the cell as "mm/yyyy" then input your data as per your "02/2017" example, all should be well. Or are you talking about converting those "00/0000" values back to dates?
 
Upvote 0
01/1900 would be the result if you formatted the number 0.000991571641051066 as "mm/yyyy" . But why would you do that? The raw number for an excel date of 02/2017 is 42767, so if you format the cell as "mm/yyyy" then input your data as per your "02/2017" example, all should be well. Or are you talking about converting those "00/0000" values back to dates?
converting them back to dates. Excel looks like it is actually doing 02/2017 as that equals what is in the cell at 0.00991571641051066. They should be dates but I think the formatting was setup wrong and this is a result of that
 
Upvote 0
So what data type is the database expecting to see for QQ/YYYY when you upload? String?
 
Upvote 0
Ok, so there are a few ways to approach this. One is to convert your data to text, which the database import will presumably like.

Example:
Book1
ABCDEFG
1Cell FormatCell Format
2QuarterYearRaw number"00/0000"Data TypeGeneralData Type
3120170.00049578601/2017<= Double01/2017<= String
4220170.00099157202/2017<= Double02/2017<= String
5320170.00148735703/2017<= Double03/2017<= String
6420170.00198314304/2017<= Double04/2017<= String
7520170.00247892905/2017<= Double05/2017<= String
8620170.00297471506/2017<= Double06/2017<= String
9720170.00347050107/2017<= Double07/2017<= String
10820170.00396628708/2017<= Double08/2017<= String
11920170.00446207209/2017<= Double09/2017<= String
121020170.00495785810/2017<= Double10/2017<= String
131120170.00545364411/2017<= Double11/2017<= String
141220170.0059494312/2017<= Double12/2017<= String
Sheet1 (2)
Cell Formulas
RangeFormula
C3C3=A3/B3
D3:D14D3=C3
F3:F14F3=TEXT($C3,"00/0000")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,097
Messages
6,123,077
Members
449,094
Latest member
mystic19

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