rivet Posted December 2, 2014 Share Posted December 2, 2014 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 Link to comment Share on other sites More sharing options...
comment Posted December 2, 2014 Share Posted December 2, 2014 If GetAsText ( Date ( 1 ; 0 ; 2014 ) ) returns '12/31/2013', then your file is not using the yyy-mm-dd date format Link to comment Share on other sites More sharing options...
Rick Whitelaw Posted December 2, 2014 Share Posted December 2, 2014 I believe if your region is set to Canada the format would be MM/DD/YYYY. Link to comment Share on other sites More sharing options...
rivet Posted December 2, 2014 Author Share Posted December 2, 2014 Here are my settings.... I will test on different machine  Link to comment Share on other sites More sharing options...
comment Posted December 3, 2014 Share Posted December 3, 2014 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. 1 Link to comment Share on other sites More sharing options...
rivet Posted December 3, 2014 Author Share Posted December 3, 2014 a bug indeed..... cloning did the trick thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 3426 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