Date object

19 views
Skip to first unread message

Ryuya

unread,
Feb 28, 2023, 10:41:47 PM2/28/23
to Google Apps Script Community
Hi there.

Hope this email finds you all well.

I have a complication that I would like to clear.

Scripting gets a date value (green and blue on the bottom of pic) from Spreadsheet then uses Utilities.formatDate(value, 'Asia/Tokyo','MM/dd/yyyy') for conversion to String (green and blue on the upper of pic as a result).

I am wondering why those are not the same as another but 1 day difference. Time setting for both apps script and spreadsheet is JST (-9hours) as I have JST Time setting.

Thank you in advance for your support.

スクリーンショット 2023-03-01 12.30.40.png

cbmserv...@gmail.com

unread,
Feb 28, 2023, 10:48:10 PM2/28/23
to google-apps-sc...@googlegroups.com

Also check your browser to see what timezone you have it set to. If data recording is done from 2 different scripts, make sure to check timezone on each of them as it could differ.

 

This is a frustrating issue for sure.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/582c2153-d3d1-41c0-90fa-ce8786c4f6f0n%40googlegroups.com.

image001.png

Ryuya

unread,
Mar 1, 2023, 12:25:52 AM3/1/23
to Google Apps Script Community
Thank you, George.

I appreciate your help. I had a try on this and it is unfortunate that it could not  make it...

Could I have other way to solve it by any chance?

Thank you.

Ryuya Sakurai

unread,
Mar 1, 2023, 5:13:08 AM3/1/23
to google-apps-sc...@googlegroups.com
I did some and it worked out.
Case closed:)

Thank you for your support :)

2023年3月1日(水) 14:25 Ryuya <ryuya_...@tyomnl.net>:
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/coWm3texTi0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/c828af35-8a34-4fd3-bb08-38de517e9f9fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages