Re: Numbers dates and AppleScript
Re: Numbers dates and AppleScript
- Subject: Re: Numbers dates and AppleScript
- From: Deivy Petrescu <email@hidden>
- Date: Fri, 20 Apr 2018 21:05:43 -0400
> On Apr 20, 2018, at 20:10 , Shane Stanley <email@hidden> wrote:
>
> On 21 Apr 2018, at 3:34 am, Deivy Petrescu <email@hidden> wrote:
>>
>> I have another script that reads the spread sheet and fills the information
>> to a webpage.
>
> How is it reading the dates: value or formatted value?
>
> --
> Shane Stanley <email@hidden>
> <www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
>
Very good question!
Actually I use value, but because of your question I decided to run the
following script and the result is very telling….
<script>
set fl to {}
set l to {}
tell application "Numbers" to tell document 1 to tell sheet 1 to tell table 1
to repeat with j from 1 to count of rows
set fd to get formatted value of last cell of row j
set d to get value of last cell of row j
set end of l to d
set end of fl to fd
end repeat
return {l, fl}
</script>
——>result:
{
{“LCA", date "Sunday, January 21, 2018 at 23:00:00", date "Monday, April 9,
2018 at 00:00:00", date "Monday, March 19, 2018 at 00:00:00", date "Monday,
April 9, 2018 at 00:00:00", date "Monday, April 9, 2018 at 00:00:00", date
"Sunday, February 11, 2018 at 23:00:00", date "Monday, April 9, 2018 at
00:00:00", date "Sunday, February 25, 2018 at 23:00:00", date "Sunday, February
4, 2018 at 23:00:00", date "Sunday, January 21, 2018 at 23:00:00", date
"Monday, March 19, 2018 at 00:00:00", date "Monday, March 19, 2018 at
00:00:00", date "Sunday, February 4, 2018 at 23:00:00", date "Monday, April 9,
2018 at 00:00:00", date "Sunday, February 11, 2018 at 23:00:00", date "Monday,
April 2, 2018 at 00:00:00", date "Sunday, January 21, 2018 at 23:00:00", date
"Sunday, February 25, 2018 at 23:00:00", date "Monday, March 19, 2018 at
00:00:00", date "Sunday, January 28, 2018 at 23:00:00", date "Monday, April 9,
2018 at 00:00:00", missing value},
{"LCA", "Jan-22", "Apr-18", "Mar-19", "Apr-18", "Apr-18", "Feb-12", "Apr-18",
"Feb-26", "Feb-18", "Jan-22", "Mar-19", "Mar-19", "Feb-18", "Apr-18", "Feb-12",
"Apr-18", "Jan-22", "Feb-26", "Mar-19", "Jan-29", "Apr-18", missing value}}
Deivy Petrescu
email@hidden
_______________________________________________
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