![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: dateOf format Topic Summary: how can I specify the format of the result of dateOf MyDate? Created On: 11-May-2006 16:26 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
the program fragment below gives the date in an unwanted format. How can this be manipulated into the desired format yyyy-mm-dd? |
|
![]() |
|
![]() |
|
Hi,
Are you sure that the given program returns the same output you mentioned? For me, I got some dxl error :-p Anyway, you can get the mentioned date format if you do some string manipulation. Try the following code: string sYYYYMMDD = "" string sTmp = "" Date MyDate = "29 Dec 2002" int MyTemp = intOf MyDate sTmp = MyDate "" //for Year sYYYYMMDD = sTmp[length(sTmp)-4:length(sTmp)] //for Month sTmp = (dateOf MyTemp) "" sYYYYMMDD = sYYYYMMDD "-" sTmp[0:1] //for Day sYYYYMMDD = sYYYYMMDD "-" sTmp[3:4] print sYYYYMMDD "\n" //it will print 2002-12-29 Greetings, Rony ================= Iftakher Uddin (Rony) HOOD Group |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
dateOf format
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.