Problem formatting date labels with DateTimeAxis and parseFunction

I'm working with a line chart that gets its data from a MySQL
database and
I'm using a DateTimeAxis to try to display the date on the
x-axis. The date
is formatted in the database as "YYYY-MM-DD" - however when I
run the
application I am only seeing the date displayed as MM/YY. I
am using a
parseFunction as follows:
public function myParseFunction(s:String):Date {
var a:Array = s.split("-");
var newDate:Date = new Date(a[0],a[1]-1,a[2]);
return newDate;
I was trying to experiment with setting dataUnits to days or
weeks but it
doesn't seem to change. Can anyone figure out what I'm doing
wrong?
Thanks,
-Dan
The code for the line chart is:
<mx:LineChart x="10" id="linechartHist"
dataProvider="{dataProvider1}"
showDataTips="true" width="100%" height="100%" y="10">
<mx:horizontalAxis>
<mx:DateTimeAxis displayName="Date" title="Date (Month)"
parseFunction="myParseFunction" dataUnits="days"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderer>
<mx:AxisRenderer canDropLabels="true"/>
</mx:horizontalAxisRenderer>
<mx:verticalAxis>
<mx:LinearAxis title="Price" id="vAxis"
labelFunction="vLongLabels"
interval="10"/>
</mx:verticalAxis>
<mx:series>
<mx:LineSeries displayName="MSFT" yField="MSFT"
xField="date"/>
<mx:LineSeries displayName="PG" yField="PG"
xField="date"/>
<mx:LineSeries displayName="NTDOY" yField="NTDOY"
xField="date"/>
</mx:series>
</mx:LineChart>

Hi
Try using "sv_SE" locale.

Similar Messages

  • Can someone please help, I have a dvd disk containing lecture videos, on a Windows pc it works fine, and the disk opens to the dvd menu. However on my macbook pro running Mountain Lion, it opens as a data disk, with video and audio in two seprate files??

    Can someone please help, I have a dvd disk containing lecture videos, on a Windows pc it works fine, and the disk opens to the dvd menu. However on my macbook pro running Mountain Lion, it opens as a data disk, with video and audio in two seprate files??

    You may need a 3rd party application to view the DVD in a wWindows format such as
    http://flip4mac-3.en.softonic.com/mac
    https://www.macupdate.com/app/iphone/5758/vlc-media-player

  • Does anyone have problems with data usage with att and Iphone5?

    Hello, Does anyone have problems with data usage or non usage I should say with Iphone 5 and AT&T?

    After 4+ months of dealing with this data usage and battery drain problem that included 3 data captures of my wife's iMac, the trigger for us regarding the problems syncing with iCloud, and 5 hours of logs off my iPhone 6 to be analyzed by Apple engineers that included times my wife's computer was both on and off to demonstrate the difference in data usage and battery drain under those conditions, I can say with very reasonable certainty that the iOS 8.3 and corresponding Mac OS 10.10.3 update has solved the problem. 
    We have now been running for about 2 weeks and data usage with the iCloud Servers attempting to sync has dropped from a rate of 31 GBs to under 15 MBs per month.  Yes, you read it right.  We were burning 2000 times as much data doing absolutely nothing important on both of our phones, a 5s and a 6.  Just imagine what that does to battery life!  The 5s would last about 5 hours and the 6 was dead in less than 14.
    The distasteful aspect of this process was how the engineers were quietly fixing the problem at the same time sending messages to my contact person within Apple that were dismissive in nature in the face of indisputable unreasonable results. I must say, this experience with the multiple times the engineers' responses were inappropriate put a little tarnish on the old Apple shine of the ‘It just works’ mantra. This was my first experience in 34 years that caused me to stop recommending Apple products without reservations and with a disclaimer.
    Since the update solved the problem, then I can only conclude that there was a logic bug regarding the reaction within the process to the incoming data that was corrected.  There was noting short of logging out of iCloud that circumvented the problem for us, Gator5000e and probably many others noted on other threads.  I am not trying to imply that this is the cause of everyones battery use problem, but it is reasonable that it was a cause for many.

  • Date Picker with Previous and Next Year Options

    Hi All,
    I am implementing a date picker in my application which is tied to an attribute of type PA0001-BEGDA. Date Picker as such works fine but navigating to previous year and Next year options are not available. User has to go month by month to different years if they have to navigate.
    Is this the normal behavior of the Date Picker or am I missing something else to get the previous and Next year icons in the Date Picker.
    Thanks,
    Nagarajan.

    hmm..I tried using the select options and it did give the same date picker with the previous and Next navigation icons...The only problem with the select options is that its a single field which has the range and can accept multiple values too...
    I tried to figure out how the date picker that we use in the custom application and the one in Select Options differ but no luck...Does this ring any bell?
    Thanks,
    Nagarajan.

  • Problem formatting date.

    I have a problem in validating and formatting date input by the user. The user input format is dd-MM-yyyy. I have to validate it and format it to dd-MMM-yy format. I tried the below code.
    import java.util.*;
    import java.text.*;
    public class DateFormatter{
         public static void main(String[] args){
              String str = "24-12-20gg";
              SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
              try{
                   sdf.setLenient(false);
                   Date date = sdf.parse(str);
                   System.out.println(date);
              }catch(Exception e){
                   System.out.println(e);
    The above code parses the date as - Tue Dec 24 00:00:00 IST 0020 . I want to throw an exception if it is not a date and is not of four digits. Any solution ?.

    Why not Java support such things. This will help to avoid reinventing the
    wheel.Java does support such things; there is no need to reinvent the wheel. Example:
    import java.text.*;
    import java.util.*;
    public class DateParseDemo {
        public static void main(String[] args) {
            new DateParseDemo().go();
        public void go() {
            String format = "dd-MM-yyyy";
            String goodDate = "24-12-2003";
            String badDate = "Dec 24, 2004";
            if (dateIsValid(format, goodDate)) {
                System.out.println("\"" + goodDate + "\" is valid!");
            if (!dateIsValid(format, badDate)) {
                System.out.println("\"" + badDate + "\" is NOT valid!");
        public boolean dateIsValid(String format, String date) {
            boolean valid = false;
            DateFormat df = new SimpleDateFormat(format);
            Date parsed;
            try {
                parsed = df.parse(date);
                valid = true;
            } catch (ParseException pe) {
                // log exception
            return valid;

  • Date Profile with Actions and Deadline Monitoring

    Hi Folks ,
    I have met an requirement of Actions with Deadline Monitoring of Date Profile . I could able to see Date profile with Day Rules in the standard , But i have met an requirement for very high imp - 2 hrs , High - 4 hrs .... etc. Where in Standard Date Profile i checked all the Date Rules which were in the XML format which describes about Day only.
    I m looking for an XML code for Date - DDMMYY & Time Format - HHMMSS and which supports my requirement.
    Would be very thankful if any could forward any step for Actions with Date profile with Time depandant.
    Thank you
    Regards,
    Amrita

    Hi Amrita,
    You take the standard XML code for the date time and copy as per your requirement and give the duration and time unit. Then assign to the action profile and see the action is appearing in transaction.Then go to tcode CRMC_ACTION_JOB and execute that transaction from their. Then the date you want to trigger the mail it will trigger in that time.
    Thanx
    Chinmaya

  • Formatted Data Labels in CFCHART

    Is there a way to format data values in CFCHART?
    All my values in database are stored as 99.9 See below). These are percentages that I need to display on a bar chart. Everything works fine except when displaying 76.0, it shows as 76. All other values that have a number besides zero after the decimal point show up fine except for zero. I want the numbers to be consistent. I am already using custom XML file for formatting but unable to display the "zero" after the decimal point.
    Let's assume, StartYear = 2007 and EndYear = 2008, and the data in Influencer_Data table looks like this:
    ID      Poll_Year     Company    Influence_ID      Pulse      Goal
    96      2008            XYZ            842                  59.6      59.6
    97      2008            XYZ            839                  80.8      80.8
    98      2008            XYZ            838                  86.9      86.9
    99      2008            XYZ            841                  67.1      67.1
    100    2008            XYZ            840                  66.3      66.3
    101    2008            XYZ            470                  54.5      54.5
    102    2007            XYZ            842                  56.5      56.5
    103    2007            XYZ            839                  81.5      81.5
    104    2007            XYZ            838                  85.5      85.5
    105    2007            XYZ            841                  71.2      71.2
    106    2007            XYZ            840                  76.0      76.0
    107    2007            XYZ            470                  54.2      54.2
    108    2008            XYZ            843                  82.6      82.6
    And the data in influencers table looks like this:
    Influencer_ID Influencer_Type
    470      Regulators
    838      Financial Community
    839      Community Leaders
    840      Media
    841      Government
    842      Advocates
    843      Mexico
    <cfloop index="i" from="#StartYear#" to="#EndYear#" step="1">
         <CFQUERY NAME="GetInfluenceData#i#" DATASOURCE="#RMIDSN#">
              Select     ID.*, I.Influencer_Type
              From     Influencer_Data ID
                   INNER JOIN Influencers I ON ID.Influencer_ID = I.Influencer_ID
              Where     ID.Poll_Year = <cfqueryparam value="#i#" cfsqltype="CF_SQL_INTEGER">
                   AND ID.Company = 'XYZ'
              Order     By I.Influencer_Type
         </CFQUERY>
    </cfloop>
    The custom XML file (TLRIS.xml) looks like this:
    ?xml version="1.0" encoding="UTF-8"?>
    <frameChart isInterpolated="false">
              <frame xDepth="4" yDepth="5" outline="black" isVGridVisible="true"/>
              <xAxis>
                   <labelFormat pattern="#0.0"/>
              </xAxis>
              <yAxis>
                   <labelFormat pattern="#0.0"/>
                   <labelStyle orientation="Horizontal"/>
              </yAxis>
              <dataLabels style="Value" font="Arial-12" isMultiline="true">
              <![CDATA[ $(value) ]]>
              </dataLabels>
              <legend allowSpan="true" equalCols="false" isMultiline="true"/>
              <elements drawOutline="false">
                   <morph morph="Grow"/>
              </elements>
              <popup decoration="Round"/>
              <paint palette="Fiesta" paint="Plain" isVertical="true" min="47" max="83"/>
              <insets right="5"/>
    </frameChart>
    And the code for the graph is below:
    <cfoutput>
    <cfchart format="#ChartType#"
         chartheight="300"
         chartwidth="750"
         scalefrom="0"
         scaleto="100"
         foregroundcolor="##000000"
         databackgroundcolor="##ffffff"
         font="Arial"
         fontsize="10"
         labelformat="number"
         style="TLRIS.xml"
         show3d="yes"
         showlegend="yes"
         tipstyle="mouseOver"
         tipbgcolor="##FFFF00">
         <cfloop index="i" from="#StartYear#" to="#EndYear#" step="1">
              <cfset LoopCount = LoopCount + 1>
              <cfset WhichColor = ListGetAt(colorlist, LoopCount)>
              <cfchartseries     
                          type="bar"
                         serieslabel="#i#"
                         seriescolor="#WhichColor#"
                         datalabelstyle="pattern">
                         <cfloop query="GetInfluenceData#i#">
                                    <cfchartdata item="#Influencer_Type#" value="#Pulse#">
                         </cfloop>
              </cfchartseries>
         </cfloop>
    </cfchart>
    </cfoutput>

    mohadi wrote:
    I have already done that with no success.
    I am beginning to believe this may be a bug.
    Even if you try something as simple as the following, the decimal points that have zeroes don't show
    <cfchart style="beige">
    <cfchartseries type="pie">
    <cfchartdata item="New car sales" value="50.0">
    <cfchartdata item="Used car sales" value="55.0">
    <cfchartdata item="Leasing" value="56.5">
    <cfchartdata item="Service" value="76.2">
    </cfchartseries>
    </cfchart>
    Well that is the wrong kind of chart and it is not using the xml style.  But it works perfectly with a bar chart, using a custom style. The values display exactly as you have them above.
    <cfchart style="myPatternStyle.xml">
        <cfchartseries type="bar">
            <cfchartdata item="New car sales" value="50.0">
            <cfchartdata item="Used car sales" value="55.0">
            <cfchartdata item="Leasing" value="56.5">
            <cfchartdata item="Service" value="76.2">
        </cfchartseries>
    </cfchart>
    <!--- snippet from xml styles --->
    .... other xml ....
    <yAxis scaleMin="0">
          <titleStyle font="Arial-12-bold"/>
          <dateTimeStyle majorUnit="Year" minorUnit="Month"/>
          <labelFormat style="Pattern" pattern="#,##0.0#######"/>
    </yAxis>
    .... other xml ....

  • Problem processing RAW images with Lion and 3.1.3

    Images that have "This photo was adjusted using an earlier version of Apple's RAW processing.  Attempting to send to a plug-in or Photoshop results in a dialog "Editing Error This image cannot be rendered for editing because Aperture does not support the image format."  Images that were previously processed with the current version of RAW processing work correctly.

    There is another discussion for problem with raw and the new 10.7.3.1 : my Raw from Panasonic GH2 are green and Aperture says : treatment with old version
    I find the solution to correct my RAW : they are green because of the bad WB applied by Aperture.
    I put here the solution but I have to correct manually and ask to treatment in the RAW windows for each picture. If it doesn't work, I correct manually the WB.
    https://discussions.apple.com/thread/3942768?start=0&tstart=0
    We have to report this bug to Apple.

  • Problems in query result with infoset and timedep infoobject

    Hi,
    I have the following situation:
    infoobject ZEMPLOYEE timedep
    Infocube 0C0_CCA_C11 (standard cost center/cost element postings)
    -> infoset with infoobject and infocube linked with outer join
    My query should show all active employees in one month without any posting in the infocube.
    My testdata looks like this:
    pernr date from    date to         cost center
    4711  01.01.1000 31.12.2002
    4711  01.01.2003 31.01.2009   400000
    4711  01.02.2009 31.12.9999
    That means the employee is only active between 01.01.2003 and 31.01.2009.
    I expect the following result in the query with key-date 31.01.2009:
    4711  01.01.2003 31.01.2009   400000
    I expect the following result in the query with key-date 01.02.2009:
    no result
    -> because the employee is not active anymore, I don't want to see him in the query.
    My query delivers the following result:
    4711  01.02.2009 31.12.9999
    The first and the last entry in master data is automatically created by the system.
    I tried to exclude the not active employees by selection over cost center in the filter (like cost center between 1 and 9999999, or exclude cost center #). But unfortunately the filter selection does not work, because obviously the attributes are not filled in the last entry.
    Is there anyone who can tell me how I can exclude the last entry in the master data in the query?
    Any help is much appreciated! Points will be assigned!
    best regards
    Chris

    HI,
    problem is that I can't use employe status in this case, beacuse for any reason the people don't use it.
    I have also tried with exceptions and conditions, but the attributes ar enot filled, so it seems that nothing works.
    Do you have any other suggestions?
    Thanks!
    best tregards
    Chris

  • Delete data dynamically with JSP and servlet (Very Urgent)

    Hi,
    I am new with servlets and JSP. On my jsp page I am populating customer names in a drop box from database and I have 3 buttons ADD, DELETE and EDIT.
    Now when I press DELETE buttong I am calling delete function which is writen in Javascript on my jsp file only,now I want to pass these selcted values ehich I have stored in an array to be pass to servlet,so I can write Delete query for it and delete.
    Could anyone help with sample code>
    Here what I am trying to say:
    <HTML>
    <HEAD>
    <script language="JavaScript" type="text/javascript">
    <!--
    function remove()
    var u = confirm("Are you sure you want to Delete Selected names?")
    if (u==true)
         var selectedArray = new Array();
         var selObj = document.getElementById('CUSTOMER_NAME');
         var i;
         var count = 0;
         for (i=0; i<selObj.options.length; i++) {
         if (selObj.options.selected) {
         selectedArray[count] = selObj.options[i].value;
         count++;
         alert("names to be deleted are:"+selectedArray);
         // selectedArray has the selected items stored
         alert("Items Deleted!")
    else
    alert("No data were deleted!!You pressed Cancel!")
    //-->
    </script>
    </HEAD>
    <BODY>
    //calling servlet on action tag of form
    <FORM METHOD= 'POST' ACTION='Remove_Customer'>
    <form ><INPUT TYPE='submit' NAME='DELETE' VALUE='DELETE' onclick="remove()"></TD></form>
    <form><INPUT TYPE='submit' NAME='MODIFY' VALUE='MODIFY' onclick="modification()" ></TD></form>
    </BODY>
    </HTML>
    PLEASE HELPME,it's very urgent.
    Since the selected Array is in javascrip language , I don't know how can I pass that to servlet.
    request.getParameter is not working,since it's an array
    Many thanks in Advance.

    Hey,
    I am having problem deleting multiple values.
    If I just select one value,it deletes it
    But for multiple values the code is not working right.
    If there 2 values selcted then the last value gets deleted,if there are more than 2 values selected none values delete.
    Could plese check the code,and let meknow what mistake am I doing?
    Please help
    String delName="";
    int pos = tStr.indexOf(",");
    System.out.println(pos);
         if (pos != -1)
                   delName = tStr.substring(0, tStr.indexOf(","));
              tStr = tStr.substring(tStr.indexOf(",") + 1 );
                   System.out.println("DElName:"+delName);
                   System.out.println("tStr::"+tStr);                              
                        delName = tStr;
                        delete_Customer(delName);
    Thanks
    ASH

  • Sql query data horizontally with sum and condition in a row

    I am trying to get data from the following query in a row with total but not succeed and getting error message. Please help and advise.
    Select empid,name,country,
    sum(case category when 'JOB' then sum(core+RR) else 0 end) as 'JOB-Sum',
    sum(case category when 'PRIVATE' then sum(core+PP) else 0 end) as 'PRIVATE-Sum',
    group by empid,name,country
    Note: Following query is good for getting result in one row but i have to put sum calculation with 'THEN' and want result in a row.
    SELECT ID, MAX(case when Col1 = 'Yes' then 1 else 0 end) AS Col1,
    MAX(case when Col2 = 'Yes' then 1 else 0 end) AS Col2
    FROM MyTable
    GROUP BY ID

    Please show some sample data and expected output.
    Regards,
    Rob.

  • Can anyone make labels with Pages and merging Address Book?

    I want to make labels from Address Book that includes the name, Company, and address. Because Address Book makes you select Name or Company, the labels will only come out with one or the other, not both. Is there a template in Pages that imports both Name and Company? Surely, I am not the only person who wants to make mailing labels that includes both the name of the person and the Company. I don't see it in the tutorial and Apple Care indicated that it couldn't be done (but I think I was sent to the wrong person) Huh? No label possible with a name and company both!

    I persevered with this. I don't think you can really print both the name and the company in Pages which is a big deficiency in a nice program but you can in Address Book. Change all your contacts so the name is the default rather than the company. Select Print in Address Books, go to labels or envelopes, and check the box that says "print company". I wish his had been put in writing somewhere. I wasted a great deal of time inputting the same information into QuickBooks so I could print out labels to about 40 customers.

  • After syncing Pc-Ipad my Photo's are out of order. In the folders they don't follow the Date-order. I use Itunes 10.6.1.7 and Ipad 5.1. The Problem is the same with XP and Windows 7.

    After syncing PC-Ipad my Photo's on Ipad2 are out of order. In the Folders/Albums the Photo's are no longer in the order of (EXIF) dates. I have updated Itunes to 10.6.1.7 and IPad2 to 5.1. I have reset the IPad2. I cleaned the Photo-cache and removed Itunes and Installed again. I tried it with Windows 7 (64) and XP, makes no difference. I tried it with one Album, Photo's also out of order. It doesn't seem to happen with my Ipad1 older software version. I there a bug in the newest software? Thanks for Help!
    Rudy from the Netherlands.

    problem solved after updating itunes to 10.6.3

  • Formatted .data file, reading in and creating an array of objects from data

    Hi there, I have written a text file with the following format;
    List of random personal data: length 100
    1 : Atg : Age 27 : Income 70000
    2 : Dho : Age 57 : Income 110000
    3 : Lid : Age 40 : Income 460000
    4 : Wgeecnce : Age 43 : Income 370000
    and so on.
    These three pieces of data, Name,Age and Income were all generated randomly to be stored in an array of objects of class Person.
    Now what I must do is , read in this very file and re-create the array of objects that they were initially written from.
    I'm totally lost on how to go about doing this, I have only been learning java for the last month so anyone that can lend me a hand, that would be superb!
    Cheers!

    Looking at you other thread, you are able to create the code needed - so what's the problem?
    Here's an (not the only) approach:
    Create an array of the necessary length to hold the 3 variables, or, if you don't know the length of the file, create a class to contain the data. Then create an ArrayList to hold an instance of the class..
    Use the Scanner class to read and parse the file contents into the appropriate variables.
    Add each variable to either the array, or to an instance of the class and add that instance to the arraylist.

  • BUG: Incorrect data returned with JSON and CF8

    I don't know if this is a bug, but I am trying to create a
    JSONDataSet that will call a cfc which returns a query in json
    format. However, I have a problem with a column datatype
    varchar(20), for which some rows contains numbers as the value
    (01,02,03,...etc) but when the dataset is returned, the value for
    this column comes as (1.0,2.0,3.0,...etc)
    HELP!!!
    This is my code...
    var dsCities = new
    Spry.Data.JSONDataSet("/remoting/remotegeodataservice.cfc?method=getgeodata&countrycode=u s&featureclass=a&queryformat=column&returnformat=json",
    {path:"DATA", pathIsObjectOfArrays:true});

    I just dumped the dataset like this...
    <div spry:region="dsStates">
    <ul style="margin:0; padding:0;">
    <li spry:repeat="dsStates">{ADMINCODE1} -
    {ASCIINAME}</li>
    </ul>
    </div>
    For Australia this is my result dumped:
    * 1 - Australian Capital Territory
    * 0 - Heard Island and McDonald Islands (general)
    * 3 - Northern Territory
    * 2 - State of New South Wales
    * 4 - State of Queensland
    * 5 - State of South Australia
    * 6 - State of Tasmania
    * 7 - State of Victoria
    * 8 - State of Western Australia

Maybe you are looking for