Hello,
I need to display a date in a grid as EEE MM/dd/yyyy EEE is for the day of week Mon, Tue, etc
When I use that format on the attribute in the BO It displays nothing in the grid.
Do I need to store the date format I want in a text attribute and use a date function to get the name for the day of the week and use string date MM/dd/yyyy then concatenate them together?
Thanks.
date format as EEE MM/dd/yyyy
date format as EEE MM/dd/yyyy
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Re: date format as EEE MM/dd/yyyy
Looks like 'EEE' is not a supported AwareIM date format yet.
I added a 'DateString' Attribute and used this rule to convert the date and get the format I needed.
BOname.DateString=CHARS_FROM_LEFT(DAY_OF_WEEK(BOname.Date),3)+' '+AS_STRING(BOname.Date,'MM/dd/yyyy')
AwareIM support, it would be nice to have this date format like we do with 'DAY_OF WEEK' function so we don't have to convert it all the time.
I added a 'DateString' Attribute and used this rule to convert the date and get the format I needed.
BOname.DateString=CHARS_FROM_LEFT(DAY_OF_WEEK(BOname.Date),3)+' '+AS_STRING(BOname.Date,'MM/dd/yyyy')
AwareIM support, it would be nice to have this date format like we do with 'DAY_OF WEEK' function so we don't have to convert it all the time.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Re: date format as EEE MM/dd/yyyy
try ddd
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: date format as EEE MM/dd/yyyy
Hi Roger,
Here's the full Java 'SimpleDate' document that should give you all the options.
https://docs.oracle.com/javase/7/docs/a ... ormat.html
Here's the full Java 'SimpleDate' document that should give you all the options.
https://docs.oracle.com/javase/7/docs/a ... ormat.html
Avid Linux user....
-
- Posts: 2403
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: date format as EEE MM/dd/yyyy
rbross wrote:Looks like 'EEE' is not a supported AwareIM date format yet.
I added a 'DateString' Attribute and used this rule to convert the date and get the format I needed.
BOname.DateString=CHARS_FROM_LEFT(DAY_OF_WEEK(BOname.Date),3)+' '+AS_STRING(BOname.Date,'MM/dd/yyyy')
AwareIM support, it would be nice to have this date format like we do with 'DAY_OF WEEK' function so we don't have to convert it all the time.
In some places it supports EEE and in other places it is ddd dd/MM/yy
Cant remember exactly which and when off the top of my head but try both.
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: date format as EEE MM/dd/yyyy
Jaymer wrote:try ddd
I started with that and it did not work. Keep in mind the format was entered under the Format property on the attribute on the BO. If you look at all the available formats to choose from 'EEE' is not included in any of them. Also in the user's guide 'E' is no list in supported formats.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Re: date format as EEE MM/dd/yyyy
eagles9999 wrote:OK, instead of trying to store the format in the BO as EEE MM/dd/YYYY I could try to just use AS_STRING(MyDate,'EEE MM/dd/yyyy') and see if that works.rbross wrote:Looks like 'EEE' is not a supported AwareIM date format yet.
I added a 'DateString' Attribute and used this rule to convert the date and get the format I needed.
BOname.DateString=CHARS_FROM_LEFT(DAY_OF_WEEK(BOname.Date),3)+' '+AS_STRING(BOname.Date,'MM/dd/yyyy')
AwareIM support, it would be nice to have this date format like we do with 'DAY_OF WEEK' function so we don't have to convert it all the time.
In some places it supports EEE and in other places it is ddd dd/MM/yy
Cant remember exactly which and when off the top of my head but try both.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~