Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Why would a Date field default to 01/01/1970

more options

In an App called Act-On I want to edit a date but it defaults to January 01, 1970. A lot of clicks to get to today's date. Any thoughts on why the default or start date would be 1970? Act-On say all fine their end. I get the same result in Firefox, Chrome or IE. Anyone seen something similar? I've cleared Cache etc. Cheers John

In an App called Act-On I want to edit a date but it defaults to January 01, 1970. A lot of clicks to get to today's date. Any thoughts on why the default or start date would be 1970? Act-On say all fine their end. I get the same result in Firefox, Chrome or IE. Anyone seen something similar? I've cleared Cache etc. Cheers John
Attached screenshots

Chosen solution

It's hard to tell from the image whether it is a field or a text label modified by the script that powers the calendar control. If it were a normal input field, I think most likely it would be blank.

JavaScript dates start from 01/01/1970. When I type this into Firefox's Web Console and press Enter:

new Date(null);

I get back this, which is midnight on Jan. 1, 1970:

Date 1970-01-01T00:00:00.000Z

So the script might be accidentally setting that (not very helpful) starting value due to something else being missing -- using a null value instead of the expected value.

Can you give a link to the page?

Read this answer in context 👍 1

All Replies (4)

more options

Sounds like a website or app issue. Check with their support.

more options

Chosen Solution

It's hard to tell from the image whether it is a field or a text label modified by the script that powers the calendar control. If it were a normal input field, I think most likely it would be blank.

JavaScript dates start from 01/01/1970. When I type this into Firefox's Web Console and press Enter:

new Date(null);

I get back this, which is midnight on Jan. 1, 1970:

Date 1970-01-01T00:00:00.000Z

So the script might be accidentally setting that (not very helpful) starting value due to something else being missing -- using a null value instead of the expected value.

Can you give a link to the page?

more options

Thanks folks .. I think both of you are correct. The Javascript default seems to work for me. Funnily enough I just added a new "Wait" Step to the flow and when I went to choose the exact date, the default was today and not 01/01/1970. The existing Steps still default to 1970 so I've deleted them all and started afresh. Thanks for the answers. Well done.

more options

To add to what Jefferson said, the "beginning" of time (null) or "Epoch" for most computer languages is Thursday, 1 January 1970 at Midnight UTC (Coordinated Universal Time)

https://en.wikipedia.org/wiki/Epoch_%28reference_date%29#Computing https://en.wikipedia.org/wiki/Unix_time