I have a process that uses WITH to initialize some variables on a form, some are dates. How do i set the locale to MM/DD/YY?
Thanks
Bruce
How to change date format
-
- Posts: 2405
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: How to change date format
Not sure what the issue is Bruce.
Normally you set the Attribute data format in the Attribute settings in the BO.
Additionally, I was under the impression that US Date format was the default.
However, I think you can also to this....
Right Click on Locale in the tree and select New.
Set Name to " Weird USA Format" and then check "Use this locale by default"
Normally you set the Attribute data format in the Attribute settings in the BO.
Additionally, I was under the impression that US Date format was the default.
However, I think you can also to this....
Right Click on Locale in the tree and select New.
Set Name to " Weird USA Format" and then check "Use this locale by default"
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Re: How to change date format
Evening Mark,
I defined a date field with the format as MM/DD/YY. In my Process I have
ENTER NEW BONAME WITH fromDate = '09/01/14' (and tried with 4 digit year also) and on the screen was jan 9th.
Is there a trick when using the "WITH" keyword?
Thanks
I defined a date field with the format as MM/DD/YY. In my Process I have
ENTER NEW BONAME WITH fromDate = '09/01/14' (and tried with 4 digit year also) and on the screen was jan 9th.
Is there a trick when using the "WITH" keyword?
Thanks
-
- Posts: 2405
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: How to change date format
Bruce,
Haven't got the User Guide handy but try something like....
WITH AS_DATE(''09/01/14','mm/dd/YY')
Or something like that.
Haven't got the User Guide handy but try something like....
WITH AS_DATE(''09/01/14','mm/dd/YY')
Or something like that.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Re: How to change date format
I would define a DATE type attribute in SystemSettings and use that attribute in your WITH clause. That also gives you the benefit of not having the date hard coded in your application in case you ever need to change it.
Tom - V8.8 build 3137 - MySql / PostGres
Re: How to change date format
Tford: I am doing this in the Process since I will have to calculate the dates. (I will have to take todays date, go back a year, then add 91 days to that, etc.). While I am testing, just wanted to assign a date.
Mark, I added a locale with dates as default and that did not fix it. the "AS_DATE" did though.
Thanks
Mark, I added a locale with dates as default and that did not fix it. the "AS_DATE" did though.
Thanks
Re: How to change date format
You can easily add that calculation to the SystemSettings attribute both during testing and live operation. Simply add a SystemSettings rule to do the calculation, then in your process you can ensure that the calc is up to date by adding UPDATE SystemSettings to your process.Tford: I am doing this in the Process since I will have to calculate the dates. (I will have to take todays date, go back a year, then add 91 days to that, etc.). While I am testing, just wanted to assign a date.
Tom - V8.8 build 3137 - MySql / PostGres