• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Numbers Daylight Savings Bug Still Active?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Numbers Daylight Savings Bug Still Active?


  • Subject: Re: Numbers Daylight Savings Bug Still Active?
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 07 Feb 2017 15:49:10 +0100


Le 7 févr. 2017 à 15:30, Deivy Petrescu <email@hidden> a écrit :


On Feb 6, 2017, at 22:40 , Christopher Stone <email@hidden> wrote:

Hey Folks,

Starting with this data in a date-formatted cell:

10/28/16 22:03

And running this script:

------------------------------------------------------------------------------
tell application "Numbers"
  if document 1 exists then
     tell document 1
        tell active sheet
           set activeTable to (the first table whose class of selection range is range)

           tell activeTable
              set cellRef to first cell of selection range
              tell cellRef
                 set cellValue to value
                 set cellFormattedValue to formatted value
              end tell
           end tell

        end tell
     end tell
  end if
end tell

{cellValue, cellFormattedValue}
------------------------------------------------------------------------------

--> {date "Friday, October 28, 2016 at 23:03:00", "10/28/16 22:03"}

------------------------------------------------------------------------------

Value vs Formatted Value.

Is this the bug Yvan reported a year or so ago?

Or is there a rational reason for this?

TIA.

--
Best Regards,
Chris

No, it is not a bug.
It is expected.
Value is the value of the cell, the date "Friday, October 28, 2016 at 23:03:00”
Formatted value is the value you want the cell to display, in our case "10/28/16 22:03”.

The setting for formatted value is in your rhs, when you select cell.
You can change the formatted value, but not the value.

By the way, Excel, is certainly more powerful than Numbers, but there are certain features of Numbers that makes it more convenient than Excel if your needs  do not require all the power of Excel.
First the tables can be finite, versus the infinite cells in Excel (;-])
And you can have more than one table (independents) in the same sheet.

Scripting, they are very similar, however, nothing can compare to scripting Excel,the dictionary itself requires a dictionary…

Deivy Petrescu

Hello Deivy.

It seems that you miss what is puzzling Christopher.
23:03 in cellValue, 22:03 in cellFormattedValue

I don't know where he lives so I don't know if it's summer time for him.

Here - winter time - both value gives the same time component.

Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) mardi 7 février 2017 15:49:01


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Numbers Daylight Savings Bug Still Active?
      • From: Christopher Stone <email@hidden>
    • Re: Numbers Daylight Savings Bug Still Active?
      • From: Deivy Petrescu <email@hidden>
References: 
 >Numbers Daylight Savings Bug Still Active? (From: Christopher Stone <email@hidden>)
 >Re: Numbers Daylight Savings Bug Still Active? (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Numbers Daylight Savings Bug Still Active?
  • Next by Date: Re: Numbers Daylight Savings Bug Still Active?
  • Previous by thread: Re: Numbers Daylight Savings Bug Still Active?
  • Next by thread: Re: Numbers Daylight Savings Bug Still Active?
  • Index(es):
    • Date
    • Thread