![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Formatting the Attribute type "Date" Topic Summary: Different format for Attribute Created On: 8-Mar-2005 15:25 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hello,
Does anyone know if there is a way to change the date format from "08 March 2005" to another format (e.g. MM/DD/YYYY) Thanks, Donna |
|
![]() |
|
![]() |
|
///The following dxl will print out today as mm/dd/yy
/*Demo*/ int i = intOf( today ) string s= dateOf ( i) "" s= s[0:8] print s |
|
![]() |
|
![]() |
|
Thanks.
Will this also display in this format as well? or just Print? |
|
![]() |
|
![]() |
|
///The following dxl will display today as mm/dd/yy /*Demo*/ int i = intOf( today ) string s= dateOf ( i) "" s= s[0:8] display s |
|
![]() |
|
![]() |
|
I've taken your script, went to TOOLS -> Edit DXL and ran it. There were no errors, but my date formats (for the attributes with "Date" type) hasn't changed.
Am I doing something wrong? |
|
![]() |
|
![]() |
|
Ron's script displays the date today in that format.
If you want to display the value of a Date attribute in that format then you need to use a layout DXL column rather than a plain attribute column. Try the following code, substituting the name of your attribute: Date d = obj."My date Atrr" int i = intOf(d) string s= dateOf ( i) "" s= s[0:8] display s An alternative is to create a DXL attribute and display this in a column. To do this, create a new attribute of type string, check the DXL attribute checkbox and enter the following code, substituting the name of your attribute: Date d = obj."My date Atrr" int i = intOf(d) string s= dateOf ( i) "" obj.attrDXLName = s[0:8] Then you can use this attribute instead of the original. Beware that this is only of use for display and printing. Don't try to use the string representation o the date for comparisons etc. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
Telelogic DOORS
» General Discussion
»
Formatting the Attribute type "Date"
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.