Date value changes in email

54 views
Skip to first unread message

Ryan Nordman

unread,
Apr 10, 2015, 8:16:32 PM4/10/15
to forme...@googlegroups.com
Hi Henrique, thanks so much for creating this tool.

I have a strange issue here that I can't seem to figure out. Basically when I submit a date value in a form field, it is coming in the email incremented by a few days.

In my form I have a date and time field. I am inserting that field value in the email with #Date and time|M/d/yyyy H:mm#.

I'm seeing these results:
submitted, result in email
11/11/1111 1:01:00, 11/4/1111 1:01:00
2/2/0002 14:22:00, 2/4/2002 14:22:00
3/3/0003 15:33:00, 3/5/2003 15:33:00
1/1/0001 11:11:00, 1/3/2001
12/12/0012 0:12:00, 12/14/0012

Anyone have any ideas why this would occur or how to fix? I was thinking it might have something to do with timezones, but the time is coming through fine and in some cases it offset by as much as 7 days...!?

Henrique Abreu

unread,
Apr 11, 2015, 2:15:49 PM4/11/15
to FormEmailer on behalf of Ryan Nordman
Maybe your spreadsheet locale is not set as you'd expect. Please verify under File > Spreadsheet settings.
Also please check your general Google Drive setting.

Anyway, in your spreadsheet do you see the values normally or is it wrong as well?

Henrique Abreu

--
You received this message because you are subscribed to the Google Groups "FormEmailer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to formemailer...@googlegroups.com.
To post to this group, send email to forme...@googlegroups.com.
Visit this group at http://groups.google.com/group/formemailer.
For more options, visit https://groups.google.com/d/optout.

Ryan Nordman

unread,
Apr 11, 2015, 7:47:32 PM4/11/15
to forme...@googlegroups.com
Yeah, my spreadsheet locale is set to pacific time, which should be correct. I can't find a timezone setting for my general google drive. It seems like that might not be the problem because the values are correct in the spreadsheet, just wrong in the email text body. And it's a date and time entry, but the time value is unchanged the whole way through. :(

On Saturday, April 11, 2015 at 11:15:49 AM UTC-7, Henrique Abreu wrote:
Maybe your spreadsheet locale is not set as you'd expect. Please verify under File > Spreadsheet settings.
Also please check your general Google Drive setting.

Anyway, in your spreadsheet do you see the values normally or is it wrong as well?

Henrique Abreu

Henrique Abreu

unread,
Apr 11, 2015, 8:00:20 PM4/11/15
to FormEmailer Group

"Pacific" is not the locale, it's the timezone. Please confirm the locale.

Have you checked your account general setting too?

There's also a setting for the script, open the script editor and check.

Regards,

Henrique Abreu
--sent from mobile

Ryan Nordman

unread,
Apr 13, 2015, 2:52:23 PM4/13/15
to forme...@googlegroups.com
Hey Henrique,

Sorry, was operating off memory and mixed the two up. But yeah, in the spreadsheet settings, the locale is United States and the timezone is Pacific.

In my general account settings, I only see a language setting, is there somewhere that there is a locale setting?
Likewise for the script, I don't see a locale setting. I'm opening "Script Editor" from the Tools menu in my spreadsheet. Is that the right place to be looking?

Appreciate your help!


On Saturday, April 11, 2015 at 5:00:20 PM UTC-7, Henrique Abreu wrote:

"Pacific" is not the locale, it's the timezone. Please confirm the locale.

Have you checked your account general setting too?

There's also a setting for the script, open the script editor and check.

Regards,

Henrique Abreu
--sent from mobile

Henrique Abreu

unread,
Apr 13, 2015, 3:28:23 PM4/13/15
to FormEmailer on behalf of Ryan Nordman
Yes, for your account is just the language. I think they removed the Google Drive specific setting. In the script there's only the timezone.

Anyway, your problem is very weird. I don't have another ideas of why this is happening.

Henrique Abreu

Ryan Nordman

unread,
Apr 13, 2015, 5:18:42 PM4/13/15
to FormEmailer on behalf of Henrique Abreu
Thanks for looking into it for me. It's a really strange one! Anyway, I don't have any idea how to fix it either. I worked around it by just making the field a plain text field and providing instructions for the users to type in a date as a string.

If anyone else sees this in the future and figures out how to fix, let me know!

You received this message because you are subscribed to a topic in the Google Groups "FormEmailer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/formemailer/zaWTvgMwxN8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to formemailer...@googlegroups.com.

Esperanza Arce

unread,
Jan 30, 2017, 12:39:48 AM1/30/17
to FormEmailer
Has this problem been fixed?  I created a google form with a date and time field.  However, when I ran formemailer and ran my script editor, the information on the google sheet is correct, but when the email is generated I get the correct date, but with 00:00:00 next to it.  And when I enter a time, I get a date like 12/30/1899 followed by the time I entered.  I am using this for Human Resources, so the time and date have to be accurate.  I can go around this problem by doing the same thing and just using simple text, but it defeats the whole purpose of Google providing us with a date and time field.  Thank you,

Henrique Abreu

unread,
Jan 30, 2017, 7:20:15 AM1/30/17
to FormEmailer on behalf of Esperanza Arce
Your issue is not related to the original one in this thread.
Yours is just the way dates work (sheets + apps script) and merely a formatting issue.

To "fix" it just open your FormEmailer settings and adjust the field placeholder format, here's an explanation: https://sites.google.com/site/formemailer/formatting

Basically, for your date field use: #date_field|M/d/yyyy#
And for your time-only field use: #time_field|h:mm a#

Regards,

Henrique G. Abreu

--
You received this message because you are subscribed to the Google Groups "FormEmailer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to formemailer+unsubscribe@googlegroups.com.

To post to this group, send email to forme...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages