Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9843

How to access the "unformatted" date in Google Sheets?

$
0
0

I am working with a spreadsheet that includes a row where each cell contains the date of the first day in each month in a series of years: 1-Jan-18, 1-Feb-18, 1-Mar-18, ... , 1-Dec-18, 1-Jan-19, 1-Feb-19, etc.

I want these cells to only display the month they refer to, so I have them formatted to do this. The cells therefore read Jan, Feb, Mar etc, but when I click on any given cell the full date is displayed at the top of the sheet.

This all works fine, but I now want to get the =VALUE() of each of these dates. When I use the =VALUE() function, it complains that "Jan", "Feb", "Mar" etc "cannot be parsed to date/time": i.e., it doesn't recognise it as a date.

It seems that =VALUE() is taking the displayed date (e.g. Jan) as its input, rather than the stored date (e.g. 1-Jan-18). How can I get it to use the stored date? =VALUE("1-Jan-18") works fine, but =VALUE(A1) doesn't work if A1 = "1-Jan-18" but is set to display as "Jan".

EDIT: this seems only to be an issue in Google Sheets; Excel works as I would expect


Viewing all articles
Browse latest Browse all 9843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>