date format as EEE MM/dd/yyyy

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

date format as EEE MM/dd/yyyy

Post by rbross »

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.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: date format as EEE MM/dd/yyyy

Post by rbross »

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.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: date format as EEE MM/dd/yyyy

Post by Jaymer »

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
intra
Posts: 279
Joined: Thu Oct 11, 2012 1:30 pm
Location: Australia

Re: date format as EEE MM/dd/yyyy

Post by intra »

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
Avid Linux user....
customaware
Posts: 2403
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: date format as EEE MM/dd/yyyy

Post by customaware »

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....
Image
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: date format as EEE MM/dd/yyyy

Post by rbross »

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 ~
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: date format as EEE MM/dd/yyyy

Post by rbross »

eagles9999 wrote:
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.
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.
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 ~
Post Reply