edmonton Posted October 22, 2007 Posted October 22, 2007 Hi I have a g_Date field in Globals table where I enter a date. This field is defiend as Date field and storage as Global. When I click a button, the data from g_Date is put into d_date field in timesheet table which is defined as Date also. This is done using Script Step Set Field Problem is this: g_Date value is 2/2/2007 d_date value is 2/2/2007 This is fine but g_Date value is 02/02/2007 d_date value is still 2/2/2007 I would like the d_date value to be whatever is entered in g_Date without any formatting. Please Help !! :)
Inky Phil Posted October 22, 2007 Posted October 22, 2007 FM stores all dates in the same format. It will be the format that the field is set to display that will be different. In layout mode select the field in question and then select format menu>date and you will be able to change the output display to what you want. This is not a set once for all times setting it can be different each time the field is displayed. HTH phil
edmonton Posted October 22, 2007 Author Posted October 22, 2007 Thanx but I am refering to the storing of date. Both the fields on the layout have been defined "to leave formatting as entered". Moreover the layout formatting is only the display on the layout and not the storage of the field. Thanx
Inky Phil Posted October 22, 2007 Posted October 22, 2007 (edited) Well like I said I am fairly certain that FM stores all dates in the same format no matter how they are entered. If I remember correctly it stores dates as the number of days since 1 A.D. Phil Edited October 22, 2007 by Guest
comment Posted October 22, 2007 Posted October 22, 2007 I am fairly certain that FM stores all dates in the same format no matter how they are entered. If I remember correctly it stores dates as the number of days since 1 A.D. Not really, though it's often convenient to think so. However, the described 'problem' has little to do with this. The field d_date displays the date 'as entered'. But this particular date was entered by a script, as a result of a calculation whose type is Date - not by a human. Therefore it was entered in the default date format set for the file, and that's how it displays. Perhaps if the global field was of type Text, the entered format would be preserved. Probably not. I haven't tested this, and I can't think of a good reason why anyone would care.
Recommended Posts
This topic is 6243 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