【发布时间】:2017-01-05 16:06:57
【问题描述】:
我使用谷歌表单在我的日历中创建活动。我的电子表格上记录的日期格式是欧洲 DD/MM/YYYY,但在创建活动时,谷歌日历将日期信息放在美国格式 MM/DD/YYYY 中。因此,事件在错误的日期显示在我的日历中...
我检查了我的 gsuite 帐户、驱动器、工作表是否设置为正确的语言和时区(法国/巴黎)。 你能帮助我吗 ? 谢谢。
例如。 ZAZOU 先生 3 月 2 日 -----> 2 月 4 日
编辑:我用来创建事件的最后一个代码
function createEvent_ (namedValues) {
//options are the key/value pairs you can set when created a
//calendar event, below accesses the data given for description
//and location - guest is hard coded
var options = { description: namedValues.Description[0],
ocation: namedValues.Location[0],
guests:"exemple"};
//cEvent makdes the calendar event, You have to choose the calendar
//name that you would like to use, then ask for the Name of the event,
//start date and end date, then passes the options you have selected above
var cEvent = CalendarApp.getCalendarsByName("Example")[0].createEvent(
namedValues.Name[0],
new Date(namedValues.Starts),
new Date(namedValues.Ends),
options)
}
【问题讨论】:
标签: datetime google-apps-script calendar google-calendar-api google-forms