The problem here is that he's not writing a java application, he's using an existing BMC provided tool, he just wants to be able to specify the date format for his queries....
On Wed, Dec 13, 2017 at 3:46 PM, Carl Wilson <carlbwil...@gmail.com> wrote: > Hi Misi, > > When using dates in Java, I predefine the date format to use with the > following: > > > > *Declarations* > > > > *static* DateFormat *dateFormat* = *new* SimpleDateFormat("yyyy/MM/dd > HH:mm:ss"); > > > > Then when invoking, use the following to convert the date(s) correctly: > > > > Date dateLicenseDate = *dateFormat*.parse(*strLicenseDate*); > > > > Other examples: > > > > Date date = *new* Date(); > > String strDateNow = *dateFormat*.format(date); > > Date dateNow = *dateFormat*.parse(strDateNow); > > > > > > ---------------------------------------------- > > > > Kind Regards, > > > > *Carl Wilson* > > > > > > *From:* ARSList [mailto:arslist-boun...@arslist.org] *On Behalf Of *Misi > Mladoniczky > *Sent:* 13 December 2017 18:10 > > *To:* ARSList <arslist@arslist.org> > *Subject:* Re: Date format in Java API search criteria > > > > Hi, > > Some further testing seems to indicate that the following different > formats always works in any combination: > > Date portion: "2017-01-31", "2017.01.31" or "01/31/2017" > > Time portion: "23.59.59" or "11:59:59 PM" > > There might be more that works, but the question about controlling the > format still remains... > > Best Regards - Misi, RRR AB, http://www.rrr.se (ARSList MVP 2011) > > Ask the Remedy Licensing Experts (Best R.O.I. Award at WWRUG10/11/12/13) > * RRR|License - Not enough Remedy licenses? Save money by optimizing. > * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs > Find these products, and many free tools and utilities, at http://rrr.se > > > > > December 13, 2017 6:01 PM, "Grooms, Frederick W" < > frederick.w.gro...@xo.com > <%22Grooms,%20frederick%20w%22%20%3cfrederick.w.gro...@xo.com%3e>> wrote: > > What if you do set ARDATE? > > *From:* ARSList [mailto:arslist-boun...@arslist.org] *On Behalf Of *Misi > Mladoniczky > *Sent:* Wednesday, December 13, 2017 10:46 AM > *To:* ARSList <arslist@arslist.org> > *Subject:* Re: Date format in Java API search criteria > > Hi, > > Well, on my Ubuntu-machine it apparently defaults to the Swedish format > "YYYY-MM-DD HH:mm:ss". One of my clients using that same program are > successfully using the format "M/D/YYYY h:mm:ss a"... > > I tried changing my LANG environment variable without success. It seems to > pick up some other system setting. > > My standard setting: > locale > LANG=sv_SE.UTF-8 > LANGUAGE=sv > LC_CTYPE="sv_SE.UTF-8" > LC_NUMERIC=sv_SE.UTF-8 > LC_TIME=sv_SE.UTF-8 > LC_COLLATE="sv_SE.UTF-8" > LC_MONETARY=sv_SE.UTF-8 > LC_MESSAGES="sv_SE.UTF-8" > LC_PAPER=sv_SE.UTF-8 > LC_NAME=sv_SE.UTF-8 > LC_ADDRESS=sv_SE.UTF-8 > LC_TELEPHONE=sv_SE.UTF-8 > LC_MEASUREMENT=sv_SE.UTF-8 > LC_IDENTIFICATION=sv_SE.UTF-8 > LC_ALL= > > I reset LC_ALL and get this, but the parseQualification still uses the > same YYYY-MM-DD format: > locale > LANG=en_US.UTF-8 > LANGUAGE=sv > LC_CTYPE="en_US.UTF-8" > LC_NUMERIC="en_US.UTF-8" > LC_TIME="en_US.UTF-8" > LC_COLLATE="en_US.UTF-8" > LC_MONETARY="en_US.UTF-8" > LC_MESSAGES="en_US.UTF-8" > LC_PAPER="en_US.UTF-8" > LC_NAME="en_US.UTF-8" > LC_ADDRESS="en_US.UTF-8" > LC_TELEPHONE="en_US.UTF-8" > LC_MEASUREMENT="en_US.UTF-8" > LC_IDENTIFICATION="en_US.UTF-8" > LC_ALL=en_US.UTF-8 > > Best Regards - Misi, RRR AB, http://www.rrr.se (ARSList MVP 2011) > > Ask the Remedy Licensing Experts (Best R.O.I. Award at WWRUG10/11/12/13) > * RRR|License - Not enough Remedy licenses? Save money by optimizing. > * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs > Find these products, and many free tools and utilities, at http://rrr.se > > > > > December 13, 2017 5:29 PM, "LJ LongWing" <lj.longw...@gmail.com > <%22lj%20longwing%22%20%3clj.longw...@gmail.com%3e>> wrote: > > ok....that's a very good question that I've never had to explore.....the > API defaults to MM-DD-YYYY HH:MM:SS type of format....which is standard in > America (and just about nowhere else)....I've never had to deal with > date/time formatting in the Java API....so sorry, I don't have a ready > answer for you :| > > On Wed, Dec 13, 2017 at 9:15 AM, Misi Mladoniczky <m...@rrr.se> wrote: > > Hi, > > You sort of understood. > > It concerns controlling the date+time format when the Java-API program is > calling the parseQualification method. > > In a C-API program, you just set the environment variable ARDATE before > running it, and it will use the specified format. > > So how can you control this before running a Java-API program? > > Best Regards - Misi, RRR AB, http://www.rrr.se (ARSList MVP 2011) > > Ask the Remedy Licensing Experts (Best R.O.I. Award at WWRUG10/11/12/13) > * RRR|License - Not enough Remedy licenses? Save money by optimizing. > * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs > Find these products, and many free tools and utilities, at http://rrr.se > > > December 13, 2017 5:11 PM, "LJ LongWing" <lj.longw...@gmail.com > <%22lj%20longwing%22%20%3clj.longw...@gmail.com%3E>> wrote: > > I'm sorry Misi, I'm not sure I understand your inquiry...are you asking > how do you tell the Java api that when using the parseQualification method > what format a date, included in that string is? > > On Wed, Dec 13, 2017 at 9:04 AM, Misi Mladoniczky <m...@rrr.se> wrote: > > Hi, > > How do you control which date format is used by a client Java ARAPI > program when parsing the qualifier string before q query? > > In the C-API you would set environment ARDATE="%Y-%m-%d %H:%M:%S" or > similar. > > Best Regards - Misi, RRR AB, http://www.rrr.se (ARSList MVP 2011) > > Ask the Remedy Licensing Experts (Best R.O.I. Award at WWRUG10/11/12/13) > * RRR|License - Not enough Remedy licenses? Save money by optimizing. > * RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs > Find these products, and many free tools and utilities, at http://rrr.se > > > -- > ARSList mailing list > ARSList@arslist.org > https://mailman.rrr.se/cgi/listinfo/arslist > > > -- > ARSList mailing list > ARSList@arslist.org > https://mailman.rrr.se/cgi/listinfo/arslist > > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virus-free. > www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > <#m_6485193837776333397_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > -- > ARSList mailing list > ARSList@arslist.org > https://mailman.rrr.se/cgi/listinfo/arslist > >
-- ARSList mailing list ARSList@arslist.org https://mailman.rrr.se/cgi/listinfo/arslist