Date formats ... again!

Posts   
 
    
Posts: 11
Joined: 02-Aug-2005
# Posted on: 13-Oct-2005 10:05:20   

Hi, my issue with binding date formats (in another thread) was never resolved, so now I'm wondering if it is possible to set the format of a field inside the entity itself eg set the format of a date field value to be 12-OCT-2005 rather than the 12/10/05 00:00:00 that is stored in the database? That way when it is bound to a textbox it will already be in the correct format.

Rob.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 13-Oct-2005 10:46:44   

IMHO it's best to keep data in its natural format and place gui-specific stuff, if possible, in the gui. (databinding code like ITypedList and IBindingList can't be in the gui so it's in the entityclasses etc.).

So, either add a new property which returns the field as a string in the right format, or be sure to format the display in the control you're binding to.

Frans Bouma | Lead developer LLBLGen Pro