December 2, 201411 yr Is there a method to determine date format. 1. Machine region is set to 'Canada': yyyy-mm-dd 2. I figure I would set variable = Date ( 1 ; 1-1 ; 2014 ), which displays '2013-12-31' 3. Now I need to get that as a string but no luck I always get: '12/31/2014' I am off track? End goal: a. determine the cursor position ( m, d or y ) in date field, which I have solved I am now just trying to have my script region independent. b. avoid a custom function
December 2, 201411 yr If GetAsText ( Date ( 1 ; 0 ; 2014 ) ) returns '12/31/2013', then your file is not using the yyy-mm-dd date format
December 3, 201411 yr Your data viewer shows different results for = Date ( 1 ; 0 ; 2014 ) and = GetAsText ( Date ( 1 ; 0 ; 2014 ) ) I believe this means that: 1. Your system's short date format is yyyy-mm-dd; 2. The file is set to use the current system's settings (under File Options > Text > Data Entry); but: 3. The file's saved settings are mm/dd/yyyy. This is a bug, and the best way to avoid it is to clone the file under the current system.
Create an account or sign in to comment