Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to change the date format in Doors 9.5?

Hi, when I have to query by date I have to pass the date in specific format:
yyyy-MM-dd'T'HH:mm:ss
But the date come from another system which is with different one, and I have to make pre-formatting of the date all the time, so I am wondering if there is a way to change the date format while quering to specific one for example:
yyyyMMddHHmmss


Thanks in advanced.

0 votes



2 answers

Permanent link

You get quite good control over the format of dates using the stringOf perm, defined as:

"string stringOf(Date d[, Locale l][, string s] )"

That doesn't quite allow for the required format, so, how about something like this:

"Date d = dateAndTime today
string s = stringOf(d, "yyyy-MM-dd")
string ss = replaceRichText (s, 10, 1, "'T'")
print ss"

0 votes

Comments

I do not understand what is that is a kind of DXL? Where to put it ? I can change the format from the java but I need a decision to make it globally? Is there a way to do that from the UI admin interface in 9.5 or fat client in 9.3?


Permanent link
I was assuming you were running the query/compare inside DXL, in which case the conversion could be done in the same context: either a fat client, or via OSLC DXL services.

Date format in 9.x is determined by the client system locale, so it is not necessarily common or global.

0 votes

Comments

So, I have to change the locale of the server? But the language is dependent on this. And if another server in different zone is put then the logic behind will not work.  So @stuart green, you say that there is no way to make global date format change, except change of the locale of the machine? Is that right?

Date format in 9.x is determined by the client system locale.

I'm not aware of a global option.

http://www-01.ibm.com/support/knowledgecenter/SSYQBZ_9.6.0/com.ibm.doors.administering.doc/topics/c_useroptionsforlocales.html

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,079
× 201
× 19

Question asked: Nov 23 '15, 6:11 a.m.

Question was seen: 7,820 times

Last updated: Nov 24 '15, 6:00 a.m.

Confirmation Cancel Confirm