Rimbuk Posted February 1, 2001 Posted February 1, 2001 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?
Keith M. Davie Posted February 1, 2001 Posted February 1, 2001 go to the CDML forum Read the thread "Data formating ". Peace Keith M. Davie
Vaughan Posted February 4, 2001 Posted February 4, 2001 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.
Rimbuk Posted February 5, 2001 Author Posted February 5, 2001 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.
dspires Posted February 5, 2001 Posted February 5, 2001 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()">
Vaughan Posted February 13, 2001 Posted February 13, 2001 Why not do the calc in the database and circumvent the whole "browser-not-supporting-javascript" thing altogether?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now