![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: How to convert a date properly from string Topic Summary: Created On: 28-Jan-2004 20:51 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Janet, Assuming 'indexDate' is equal to "1/1/2004" in your example, then 'intOf(indexDate)' is 'intOf("1/1/2004")', which is 'intOf("1") which will return '1'. Then 'dateOf(1)' will return something like '12/31/69 17:00:01' (depending on your timezone). Instead try: o."BugCreated" = indexDate | |
![]() |
|
I am trying to import programmically from a .csv file to a module, but having trouble with dates.
I am reading in the .csv file and saving to a skip file. The CSV file looks like this: BugNo,BugStatus,BugCreated ,BugTitle 1,Open,1/1/2004,New Bug ***** Parts of my DXL code**** string index, indexStatus, indexDate, indexTitle .... Skip skBugDate = createString .... strTemp = line[inStart:inPos-1] put(skBugDate, Bug, strTemp) ... (create a new object) if (find(skBugDate, Bug, indexDate)) { o."BugCreated" = dateOf(intOf(indexDate)) } *************** My date ends up like this: 12/31/69 17:00:01 instead of 01 January 2004 Does anybody have a solution for this? |
|
![]() |
|
![]() |
|
thanks! it works
|
|
![]() |
|
![]() |
|
Isn't nice to know that sometimes things are easier in DXL than you might have thought!
------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
How to convert a date properly from string
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.