Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

format column doesn't stick

I have a spreadsheet with a date column. For some reason, the format was set to automatic and not all cells were formatted the same. If I select the column, and change the data format to date there are certain cells that revert back to automatic and also won't sort properly when I try to ascend sort. Numbers just can't change and recognize the numbers as dates, even though they appear as such. Using numbers 3.5.3 on yosemite.

MacBook Pro with Retina display, OS X Yosemite (10.10.1)

Posted on Oct 5, 2015 10:51 AM

Reply
5 replies

Oct 5, 2015 12:16 PM in response to elliottlegal

Hi elliottlegal,


Numbers just can't change and recognize the numbers as dates, even though they appear as such.

This is correct. There is something about those entries that Numbers does not see as a date/time. Check for spaces or stray punctuation. If you can't figure it out, post a screenshot that includes dates and non-dates.

quinn

Oct 5, 2015 1:20 PM in response to elliottlegal

You can strip the offending leading zeros and convert to date format with the script below.


  1. Copy-paste into Script Editor (in Applications > Utilities).
  2. Select the cells in the column with dates.
  3. Click the "Run" button in Script Editor.


Tested with Numbers 3.5.3.


SG



tell application "Numbers"

tell front document to tell active sheet

set t to first table whose selection range's class is range

set selRng to t'sselection range

repeat with c in selRng's cells

try

set v to c's value

if v's first character is "0" then ¬

set c's value to v's text 2 thru -1

set c'sformat to date and time

end try

end repeat

end tell

end tell

format column doesn't stick

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.