Jump to content

need help.. y2k issue


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

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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()">

Link to comment
Share on other sites

  • 2 weeks later...

This topic is 8466 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.