Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8684 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I created a 'date' field in my FMPro database.

I am using a custom web interface to publish it.

When I use the [FMP-CurrentDate] tag in Internet explorer, I get a 2 digit year (1/31/01). When I submit this to the database, the date is automatically changed to a 4 digit year and reads 1901.

How can I fix this?

Posted

What version of FMP are you using. Ditto for ther OS.. is the hardware and software all Y2K compliant.

Do not passs GO until they are.

Posted

I believe its a Windows NT problem

When I run the database on my Win2K machine, everything runs fine. If I host the database on our WinNT machine, thats when I get the problem. There is either an NT update we are missing or a setting I don't know about which accounts for 2 digit years.

Either way, if anyone has had a similar problem, please respond.

Posted

We are still running FMP 4.0 and I had to use a work-around to take care of this issue. The pages that need the current date input have a bit of javascript that sets the field to the current date using 4 digit years. Here it is if you want to use it. Let me know if you need more details.

<SCRIPT LANGUAGE="JavaScript">

function SystemDate(){

//current system date

var time=new Date()

var x=time

var dd=x.getDate(); (dd<10) ? dd="0"+dd : dd

var m=x.getMonth();

var yy=x.getYear();

var mm=m+1; (mm<10) ? mm="0"+mm : mm

var yyyy=yy+1900; (yyyy>3000) ? yyyy=yy : yyyy

SD= mm + "/" + dd + "/" + yyyy;

return SD

}

function showIt(){

document.CallBoard.Date.value = SystemDate()

}

</SCRIPT>

<body onLoad="showIt()">

  • 2 weeks later...
Posted

Why not do the calc in the database and circumvent the whole "browser-not-supporting-javascript" thing altogether?

This topic is 8684 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.