DateTime in Cfcharts

when I create a style for my charts using Webcharts3D
designer, and my x-axis is a DateTime field, it works in Webcharts,
but if I try to reference that style with the following XML:
<xaxis type="DateTime">
<labelFormat style="ShortDate" lenient="false"/>
<dateTimeStyle majorUnit="Year"/>
<labelStyle isMultiline="false"
orientation="Vertical"/>
<titleStyle>Measure Date</titleStyle>
</xAxis>
It gives a "/ by Zero" Error in CF
Anyone seens this before and know of a workaround?

Type
#date
at the prompt and check whether the log file date/time and the system date/time are the same. I guess the log file uses the system date/time. if tats the case then change the system date/time

Similar Messages

  • CFChart Dynamic Column HELP

    I looked over the posts on CFChart but did not find anything
    that addresses my specific problem with the cfchart. So if you can
    help, I'd appreciate it very much!
    What I want to do is take the dynamic name of the column
    derived from the first query and use that name in the Legend. E.G.
    A_R1_DIS is the first dataset, A_R1_J is the second dataset, and
    A_R1_PPLI is the third dataset. Then show a line graph with each
    dataset based on the first query. The X Axis displays the Date/Time
    value and the Y Axis displays the number of points for each record
    of time for each dataset individually. I was able yesterday to get
    all three datasets to display individually but when I tried to show
    the legend it either displayed only the first Dataset name
    "A_R1_DIS" or it displayed "NONE". Currently the code will not
    display any line on the chart and the legend repeats the A_R1_DIS
    as many times as there are records in the table (60+).
    I use the following query to get the dynamic column name
    "SelectedDatasetColName" from the MasterDataList table.
    <CFQUERY name="getSelectedDatasetColName"
    datasource="#getcfdbname.EventCFDBName#">
    SELECT MDL_TestName + '_' + MDL_DatasetID + '_' +
    MDL_MeaningfulName as SelectedDatasetColName
    FROM MasterDataList
    </CFQUERY>
    Here is where I'm using the "SelectedDatasetColName" value:
    ******************************************* queries
    <CFQUERY name="DatasetHistogramQry"
    datasource="#getcfdbname.EventCFDBName#">
    SELECT
    <cfset i = 1>
    <cfloop query="getSelectedDatasetColName">
    #SelectedDatasetColName# as col#i#,
    <cfset i = i + 1>
    </cfloop>
    JDay, TheHour, TheMinute,
    convert(varchar(12), JDay, 114) + ' ' + convert(varchar(12),
    TheHour, 114) + ':' + convert(varchar(12), TheMinute, 114) as
    DateTime
    FROM vPositionHistogram
    ORDER BY JDay, TheHour, TheMinute
    </CFQUERY>
    Here is the code for the table; which works correct:
    **************************** Report Code
    <TABLE>
    <TR>
    <TH>Day</TH>
    <TH>Hour</TH>
    <TH>Minute</TH>
    <CFOUTPUT QUERY="getSelectedDatasetColName">
    <TH>#SelectedDatasetColName# Message Count</TH>
    </CFOUTPUT>
    </TR>
    <CFOUTPUT QUERY="DatasetHistogramQry">
    <TR BGCOLOR="###IIF(DatasetHistogramQry.currentrow MOD 2,
    DE('DCDCDC'), DE('FFFFFF'))#">
    <TD ALIGN="center">#JDay#</TD>
    <TD ALIGN="center">#TheHour#</TD>
    <TD ALIGN="center">#TheMinute#</TD>
    <CFSET i = 1>
    <CFLOOP INDEX="X" FROM="1"
    TO="#getSelectedDatasetColName.recordcount#">
    <TD ALIGN="center">#evaluate("col#i#")#</TD>
    <CFSET i = i + 1>
    </CFLOOP>
    </TR>
    </CFOUTPUT>
    </TABLE>
    Here is the output for the table; Dynamic Column Name used to
    repeat counts for each dataset.
    ********************************* output
    Day Hour Minute A_R1_DIS Message Count A_R1_J Message Count
    A_R1_PPLI Message Count
    37 17 36 0 2 35
    37 17 37 19 6 32
    37 17 38 28 30 33
    37 17 39 40 27 27
    37 17 40 66 64 32
    Here is the problem code. I have tried several variations on
    this code but currently all it does is display a blank chart.
    **************************** Chart Code
    <CFCHART FORMAT="flash" CHARTHEIGHT="340" CHARTWIDTH="600"
    SHOWXGRIDLINES="yes" SHOWYGRIDLINES="yes" SHOWBORDER="no"
    FONTBOLD="no" FONTITALIC="no" XAXISTITLE="Timeline (Day
    Hour:Minute)" YAXISTITLE="Message Counts" SHOW3D="no" ROTATED="no"
    SORTXAXIS="no" SHOWLEGEND="yes" TIPSTYLE="MouseOver"
    SHOWMARKERS="no">
    <CFOUTPUT QUERY="DatasetHistogramQry">
    <CFSET i = 1>
    <CFLOOP INDEX="X" FROM="1"
    TO="#getSelectedDatasetColName.recordcount#">
    <CFCHARTSERIES QUERY="DatasetHistogramQry" TYPE="line"
    ITEMCOLUMN="#DateTime#" VALUECOLUMN="#evaluate("col#i#")#"
    SERIESLABEL="#getSelectedDatasetColName.SelectedDatasetColName#">
    <CFSET i = i + 1>
    </CFLOOP>
    </CFOUTPUT>
    </CFCHART>
    Please let me know if you need any additional info on my
    problem and if you can help, it is greatly appreciated!!!!
    - Debra

    DateTime is a column in the vPositionHistogram (View). Col#i#
    is the variable used to loop through the column names derived from
    the getSelectedDatasetColName query. The view is populated
    dynamically and the columns in it vary depending on the dataset
    used to populate the view. The view can have 1 to many columns.
    That is why I pull the column names from the MasterDataList table
    and use a variable to get the values from each column. My column
    names end up being Col1, Col2, Col3, and so on. I use that variable
    in the loop to get the data from vPositionHistogram for each column
    in the report/chart. I made some headway on Friday before I called
    it a day, but I will try the last suggestion and post my findings
    in a little while. Thanks!

  • Can you help me get the time format to match XML dateTime?

    XML has a dateTime format which looks like this:
    2002-10-10T12:00:00-05:00
    and Im using XMLElement() functions in some queries to produce an xml document however it truncates the time portions of the data stored so it's just MM/DD/YYYY.
    i would use a to_char function but I'm not sure what date format in Oracle to use to match the timezone portion at the end (-05:00) and how to get it to accept that 'T' in there as a separator as defined in the XML Schema spec:
    http://www.w3.org/TR/xmlschema-2/
    Does anyone know?

    Hi,
    trant wrote:
    XML has a dateTime format which looks like this:
    2002-10-10T12:00:00-05:00
    and Im using XMLElement() functions in some queries to produce an xml document however it truncates the time portions of the data stored so it's just MM/DD/YYYY.
    i would use a to_char function but I'm not sure what date format in Oracle to use to match the timezone portion at the end (-05:00) and how to get it to accept that 'T' in there as a separator as defined in the XML Schema spec:
    http://www.w3.org/TR/xmlschema-2/
    Does anyone know?Try something like
    SELECT     TO_CHAR ( SYSTIMESTAMP
              , 'YYYY-MM-DD"T"HH24:MI:SSTZH:TZM'
    FROM     dual;Sample output:
    2011-07-25T15:50:12-04:00The TO_CHAR function is described in the SQL Language reference manual:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/sql_elements004.htm#sthref396
    Look up "Format Models, Date" in the index.
    To put boilerplate (that is, fixed) text , such as the letter 'T', in the output, include it in double-quotes.
    TZH is the format specifier for Time Zone Hours, and TZM stands for Time Zone Minutes.

  • Catch datetime exception and custom error message in SSRS

    I currently working on create report by using SSRS. I have 2 parameters: [Start date] and [End date] to filter data from database and show it on report. I want to validate 2 datetime parameter as describe above. Please tell me a solution to do this.
    For example:
    When user type the text like: 4/15/2014mmm => System validation thrown a message: [The From Date not correct type]
    But in my case, I want to receive a custom error message by myself.(Look like: [Date Invalid!])

    Hi Brain,
    According to your description, you have a report with two parameters for user to input. Now you want to validate these two parameters and display custom error message when the date is invalid. Right?
    In Reporting Service, it doesn’t provide any interference for us to modify the system error message (the text in grey color). That means we can’t modify the system message when error occurs. However we can create a textbox in this report, use custom code
    and expression to display the custom error message. But this all based on the report is successfully running. So if error occurs during report processing, all the custom code and expression will not work. In this scenario, we find a workaround for you. We
    use custom code to judge if the date is valid, if the users type an invalid date, we return a default value to make sure this report can successfully run. Then we use expression to control the visibility of tablix in this report and create a textbox to show
    the custom error message. Your case has been tested in our local environment. Here are steps and screenshots for your reference:
    Go to Report Properties. Put the code below into custom code:
    Public Shared a As Integer=0
    Public Shared Function IsDate(d1 As String,d2 As String) as Integer
            Try
               FormatDateTime(d1)
               FormatDateTime(d2)
            Catch ex As Exception
                       a=1
            End Try
    return a
    End Function
    Create two parameters. One is StartDate, the other is EndDate. Set the data type of these two parameters Text.
    Create a filter for StartDate, put the expression below into Value:
    =IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,CDate(IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,Parameters!StartDate.Value,"1/1/2012")),CDate("1/1/2012"))
    Create a filter for EndDate, put the expression below into Value:
    =IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,CDate(IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,Parameters!EndDate.Value,"1/1/2013")),CDate("1/1/2013"))
    Ps: In step3 and step4, the date(“1/1/2012”, “1/1/2013”) in the expression are the default we set to make sure the report can successfully process. You can set any date existing in your dataset.
    Use the expression below to set the visibility of the tablix:
    =IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,false,true)
    Create a textbox, put the expression below into it:
    =IIF(Code.IsDate(Parameters!StartDate.Value,Parameters!EndDate.Value)=0,"","Date invalid")
    Save and preview. It looks like below:
    Reference:
    SSRS Calendar and Date Restriction
    Errors and Events Reference (Reporting Services)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
      

  • Datetime parameter from stored procedure

    <p>I have a report written in CR10 which uses a stored procedure as the datasource. The stored procedure has 3 input parameters, two of which are datetime data types. When the crystal report is run, it prompts the user for the 3 parameters & runs just fine except...</p><p>For the date parameters, it prompts the user to enter a time as well. In previous versions of Crystal, parameters that were datetime data types in the stored procedure were just prompted for the date when the calling crystal report was run.</p><p>I attempted to edit the parameters in the report, but the "Value Type" is grayed out (I assume since the parameter is associated with the stored procedure, rather than being a user defined parameter within the report).  These date parameters are used in a BETWEEN statement in the stored proc, so if the user just enters a date but accepts the default time, the returned data gets flakey due to the addition of the time value passed by the parameter.</p><p> I tried setting a default value for the time, but I have to enter a date along with the time, which the report then uses as the default. The user then has to uncheck the "Pick from defaults" checkbox in order to enter their own date. This is really unwieldly for the end user, especially when they were previously able to just enter a date and not have to be concerned with a time at all.</p><p>Does anyone have suggestions on working around this issue? </p><p>Thanks in advance...</p>

    <p>You mention that you are using CRW version 10 for this.  What&#39;s the data source you are reporting against (you mention a stored procedure - but are you running against Oracle, SQL Server, DB2?).  Are you connecting natively or using ODBC? <br /></p>

  • Null value for int and datetime date type in xml schema

    hi:
    I am embarrassed by a qustion in xml schema; i defined a xml schema file like
    this:
    <elementFormDefault="qualified" attributeFormDefault="qualified">
    <xs:element name="test">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="password" type="xs:string" nillable="true"/>
    <xs:element name="user" type="xs:int" nillable="true"/>
    <xs:element name="s_time" type="xs:dateTime"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    and I send this file to workflow clientrequest() node, I wanted to receive data
    in this schema file.but when i send null value to the element "user" and "s_time"
    in workshop test tool(test soap),and use function in xmlbean like isNilUser or
    isNilStime, one error occur.
    I don't kown why, I had to ask the engineer of bea in china, one told me a bug.
    is that true?

    Visakh16 I cant agree more with you on it, it is good but in production u cant have them change maxrows. I think
    Patrick  Hurst is a better option. debug the package have it running and move up
    Please mark as helpful and propose as answer if you find this as correct!!! Thanks,Dia Agha .
    Hmm..Why do you need to change it in production?
    What I suggested was to tweak the setting in dev machine so that it interprets the Excel file datatypes correctly when doing development. Once mapping is set correctly then it will work fine when in production or in any other environment. The tweaking is
    just to make sure it interprets the datatype correctly at design time and has nothing to do with production deployment 
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to return a single datetime from multiple rows of MAX(value) in DAX

    Hi
    I have a Results table with ResultTime, Balance, Equity which is updated with a new row every 5 minutes. I've used SUMX to find opening and closing balances and it has worked so far.
    Res_OpeningBalance:=SUMX(TOPN(1,Results,Results[ResultTime],1),[Balance])
    Res_ClosingBalance:=SUMX(TOPN(1,Results,Results[ResultTime],0),[Balance])
    But when I tried it with dates, the whole thing fell apart.
    Res_MaxBalance_Date:=SUMX(TOPN(1,Results,Results[Balance],0),[ResultTime])
    Since the highest Balance is likely to be represented through many rows due to it lasting more than 5 minutes, ResultTime (which is unique to each row) is summed up and returns messed up dates well into the future. How to return only one date (first or last
    datetime) from the rows where Balance is at max?
    I tried a TOPN of TOPN, but Excel was not amused.
    =SUMX(TOPN(1,Results,Results[Balance],0),TOPN(1,Results,Results[ResultTime],0))
    TIA!
    Re
    Dennis

    I still don't understand RANKX, but I figured it out anyway. I get the correct data by using:
    Res_MaxBalance:=MAX(Results[Balance])
    Res_MaxBalanceDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Balance]=MAX(Results[Balance])))
    Res_MinBalance:=MIN(Results[Balance])
    Res_MinBalanceDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Balance]=MIN(Results[Balance])))
    Res_MaxEquity:=MAX(Results[Equity])
    Res_MaxEquityDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Equity]=MAX(Results[Equity])))
    Res_MinEquity:=MIN(Results[Equity])
    Res_MinEquityDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Equity]=MIN(Results[Equity])))
    Re
    D

  • DateTime format

    Hello,
    We're currently working project that uses SharePoint 2013 platform to do the heavy lifting. One of the requirements we have is that system must comply with various acts which includes date and time formatting.
    The problem we're having is that our locale has two ways of formatting date values but only one is allowed in official documents and we can't find a way to force SharePoint to use the one we need. It doesn't seem care what format is set on the server regional
    settings nor it allows to specify format on the site settings. But it does seem to be related to regional settings somehow since using different versions of Windows Server has different results:
    Windows Server 2012 - uses yyyy-MM-dd which is what we need.
    Windows Server 2008 - uses yyyy.MM.dd which is what we have.
    Neither creating derived datetime field, nor creating calculated fields is an option for us. Using 2012 server is also of the table.
    Any ideas as to how could we make this work?

    Hi Valdas,
    I am trying to involve someone familiar with this topic to further look at this issue.
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • Not able to convert element of type xs:date to dateTime in XSLT 2.0

    Hi,
    I am trying to subtract 2 dates and get the month difference between the two using XSLT 2.0
    This is what I have done
    <xsl:variable name="monthDiff">
    <xsl:call-template name="monthDifference">
    <xsl:with-param name="date1" select="/tns:StartDate"/>
    <xsl:with-param name="date2" select="xp20:current-dateTime()"/>
    </xsl:call-template>
    Template
    <xsl:template name="monthDifference">
    <xsl:param name="date1"/>
    <xsl:param name="date2"/>
    <xsl:value-of select="(xsd:dateTime($date1) - xsd:dateTime($date2))"/>
    </xsl:template>
    Problem I am facing is
    1. If the value of tns:StartDate is in below format then this transformation works successfully
    2012-08-31T10:00:37+05:30
    2. But I am getting tns:StartDate as input in the below format due to which the transformation fails
    2012-08-31-04:00
    I tried formatting the date in required format but still the transformation fails
    Can someone please help in solving this issue..
    Thanks in Advance.
    Thanks,
    Anju
    Edited by: Anju on Aug 29, 2012 11:10 PM

    Hi Anju,
    Try this...
              <xsl:variable name="monthDiff">
                   <xsl:call-template name="monthDifference">
                        <xsl:with-param name="date1" select="/tns:StartDate"/>
                        <xsl:with-param name="date2" select="xp20:current-date()"/>
                   </xsl:call-template>
              </xsl:variable>
         <xsl:template name="monthDifference">
              <xsl:param name="date1"/>
              <xsl:param name="date2"/>
              <xsl:value-of select="(xsd:date($date1) - xsd:date($date2))"/>
         </xsl:template>Cheers,
    Vlad

  • How to calculate the time duration on a datetime column?

    Hi guys,
    I've done some search on this forum and everywhere else but I can't seem to get this right, at the beggining it sounded like something very simple to accomplish, for the instance with Excel but I'm struggling to get it to work with Crystal Reports on Microsoft Visual Studio 2008.
    I have a datetime column (SQL Server 2000) that I wanted to calculate the the time duration on the report group footer, unfortunatelly the built-in SUM function cannot be applied and I've tried several formulas that I've found on the internet without any luck. I'm using a datetime column to store only the time because I'm stuck with SQL Server 2000 which doesn't have a time data type.
    Would you guys know how to do it by any chance?
    Some sample code I've tried: http://www.minisolve.com/TipsAddUpTime.htm
    Thanks a lot,
    Paul
    Edited by: Paul Doe on Dec 12, 2009 5:41 PM
    Some sample data:
    EMPLOYEE     WORK HOURS
    =========     =================
    JOHN DOE      1900-01-01 01:00:05
    JOHN DOE      1900-01-01 00:20:00
    JOHN DOE      1900-01-01 01:30:15
    =========     =================
    HOURS WORKED: 02:50:20
    Edited by: Paul Doe on Dec 12, 2009 5:42 PM
    Edited by: Paul Doe on Dec 12, 2009 5:45 PM

    Guess what, by further testing the code on the website mentioned above I got it working.
    Pus, I needed to change the grouping on the code, so I had to come up with a way to update the formulas based on the groupping field.
    Considering "call_date" is the field that you are groupping by on the designer use the following code to update the formula:
    CrystalReportObj = new ReportDocument();
    CrystalReportObj.Load("C:\\reportfile.rpt");
    FieldDefinition FieldDef;
    //Get formula
    FormulaFieldDefinition FormulaDef1;
    FormulaDef1 = CrystalReportObj.DataDefinition.FormulaFields["SubHours"];
    //Get formula
    FormulaFieldDefinition FormulaDef2;
    FormulaDef2 = CrystalReportObj.DataDefinition.FormulaFields["subMinSec"];
    //Update the formula to work with the new grouping field,
    //this must be called first else will throw an exception
    FormulaDef1.Text = FormulaDef1.Text.Replace("call_date", "call_extension");
    FormulaDef2.Text = FormulaDef2.Text.Replace("call_date", "call_extension");
    //Get the new field we are grouping by
    FieldDef = CrystalReportObj.Database.Tables[0].Fields["call_extension"];
    //Replace current grouping field with the new one,
    //considering there only one group in the report, index 0
    CrystalReportObj.DataDefinition.Groups[0].ConditionField = FieldDef;
    Have fun.
    Edited by: Paul Doe on Dec 12, 2009 8:43 PM
    Edited by: Paul Doe on Dec 12, 2009 8:53 PM

  • Crystal Report that reads from an XML file Datetime or Date

    I have a Crystal Report 2008 that reads from an XML file, the source File XML Date data looks like this: 2008-03-10
    But the Crystal Report interpreted by datatime, I need the Crystal Report to look like this: 2008/03/10 (date) not 2008-03-10T00:00:00-05:00 (datatime)
    Look at an example (source file xml, report, and parameter file to execute report) at url: http://www.5websoft.com/sample.zip
    Import the file in the design and will to verify that interpret incorrectly the fields of type date as datetime
    not mapped currently for fields..
    Help.....
    Thanks!

    You could always reformat the field to only display the date portion:
    Format Field > Date and Time tab; choose the date style you need here.
    Or create a formula to extract just the date and use this field in your report:
    date({table.field})

  • How to create trend line in cfchart?

    I can create a scatter chart in cfchart - but I do not know how to create a linear regression trend line in the same chart as a second data series. Kodemonki provided an answer in a forum discussion a few years ago (http://forums.adobe.com/message/192848#192848) - but I am not able to make it work (I have a dangerously small knowledge of coldfusion and statisitcal formulas). Can someone tell me where i put in my to data query variables - such as for a query that gives results for two data fields, "Item1" and "Item2".
    Here is Kodemonki's solution:
    <!--- The min setting is a preference based on how you want the data to be displayed. --->
    <!---<cfset min = arrayMin(grabData["value"]) - 5>--->
         <cfset min = 0>
         <cfset max = ceiling(arrayMax(grabData["value"])) + 1>
         <cfset n = grabData.recordCount>
         <cfset sum_x = 0>
         <cfset sum_x2 = 0>
         <cfset sum_xy = 0>
         <cfloop from="1" to="#grabData.RecordCount#" index="i">
              <cfset sum_x = sum_x + i>
              <cfset sum_xy = (i*grabData.value[i]) + sum_xy>
              <cfset sum_x2 = sum_x2 + (i*i)>
         </cfloop>
         <cfset sum_y = arraySum(grabData["value"])>
         <cfset slope = round(((n*sum_xy) - (sum_x*sum_y))/((n*sum_x2) - (sum_x*sum_x)))>
         <cfset intercept = round((sum_y - (slope*sum_x))/n)>
         <cfset best_fit = QueryNew("id, value")>
         <cfloop from="1" to="#grabdata.RecordCount#" index="i">
              <cfset queryAddRow(best_fit)>
              <cfset value = round((slope*i) + intercept)>
              <cfset QuerySetCell(best_fit, "id", grabData.xlabel[i])>
              <cfset QuerySetCell(best_fit, "value", value)>
         </cfloop>
         <cfchart scalefrom="#min#" scaleto="#max#" title="#GrabDatapointInfo.label#" format="jpg" chartHeight="450" chartwidth="500" xaxistitle="Month/Year">
              <cfchartseries type="line" query="best_fit" valuecolumn="value" itemcolumn="id"/>
              <cfchartseries type="line" query="grabData" valuecolumn="value" itemcolumn="xlabel"/>
         </cfchart>

    Have you read the docs for CFCHART, CHCHARTSERIES, etc?  Did you mess around with the example code sufficiently so you understand how the tags work?
    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-79 30.html
    Adam

  • Hide / unhide dropdownlist in DateTime Picker

    I am writing an ASP.NET application and using javascript DateTime Picker code (I have found it on the Internet):
    <script type="text/javascript">
    // <!-- <![CDATA[
    // Code begin...
    // Set the initial date.
    var ds_i_date = new Date();
    ds_c_month = ds_i_date.getMonth() + 1;
    ds_c_year = ds_i_date.getFullYear();
    // Get Element By Id
    function ds_getel(id) {
        return document.getElementById(id);
    // Get the left and the top of the element.
    function ds_getleft(el) {
        var tmp = el.offsetLeft;
        el = el.offsetParent
        while(el) {
            tmp += el.offsetLeft;
            el = el.offsetParent;
        return tmp;
    function ds_gettop(el) {
        var tmp = el.offsetTop;
        el = el.offsetParent
        while(el) {
            tmp += el.offsetTop;
            el = el.offsetParent;
        return tmp;
    // Output Element
    var ds_oe = ds_getel('ds_calclass');
    // Container
    var ds_ce = ds_getel('ds_conclass');
    // Output Buffering
    var ds_ob = '';
    function ds_ob_clean() {
        ds_ob = '';
    function ds_ob_flush() {
        ds_oe.innerHTML = ds_ob;
        ds_ob_clean();
    function ds_echo(t) {
        ds_ob += t;
    var ds_element; // Text Element...
    var ds_monthnames = [
    'Jan', 'Feb', 'Mars', 'Apr', 'Mai', 'Jun',
    'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des'
    ]; // You can translate it for your language.
    var ds_daynames = [
    'Sun', 'Man', 'Tue', 'Wen', 'Thu', 'Fri', 'Sat'
    ]; // You can translate it for your language.
    // Calendar template
    function ds_template_main_above(t) {
        return '<table cellpadding="3" cellspacing="1" class="ds_tbl">'
             + '<tr>'
             + '<td class="ds_head" style="cursor: pointer" onclick="ds_py();"><<</td>'
             + '<td class="ds_head" style="cursor: pointer" onclick="ds_pm();"><</td>'
             + '<td class="ds_head" style="cursor: pointer" onclick="ds_hi();" colspan="3">[Close]</td>'
             + '<td class="ds_head" style="cursor: pointer" onclick="ds_nm();">></td>'
             + '<td class="ds_head" style="cursor: pointer" onclick="ds_ny();">>></td>'
             + '</tr>'
             + '<tr>'
             + '<td colspan="7" class="ds_head">' + t + '</td>'
             + '</tr>'
             + '<tr>';
    function ds_template_day_row(t) {
        return '<td class="ds_subhead">' + t + '</td>';
        // Define width in CSS, XHTML 1.0 Strict doesn't have width property for it.
    function ds_template_new_week() {
        return '</tr><tr>';
    function ds_template_blank_cell(colspan) {
        return '<td colspan="' + colspan + '"></td>'
    function ds_template_day(d, m, y) {
        return '<td class="ds_cell" onclick="ds_onclick(' + d + ',' + m + ',' + y + ')">' + d + '</td>';
        // Define width the day row.
    function ds_template_main_below() {
        return '</tr>'
             + '</table>';
    // This one draws calendar...
    function ds_draw_calendar(m, y) {
        // First clean the output buffer.
        ds_ob_clean();
        // Here we go, do the header
        ds_echo (ds_template_main_above(ds_monthnames[m - 1] + ' ' + y));
        for (i = 0; i < 7; i ++) {
            ds_echo (ds_template_day_row(ds_daynames));
    // Make a date object.
    var ds_dc_date = new Date();
    ds_dc_date.setMonth(m - 1);
    ds_dc_date.setFullYear(y);
    ds_dc_date.setDate(1);
    if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) {
    days = 31;
    } else if (m == 4 || m == 6 || m == 9 || m == 11) {
    days = 30;
    } else {
    days = (y % 4 == 0) ? 29 : 28;
    var first_day = ds_dc_date.getDay();
    var first_loop = 1;
    // Start the first week
    ds_echo (ds_template_new_week());
    // If sunday is not the first day of the month, make a blank cell...
    if (first_day != 0) {
    ds_echo (ds_template_blank_cell(first_day));
    var j = first_day;
    for (i = 0; i < days; i ++) {
    // Today is sunday, make a new week.
    // If this sunday is the first day of the month,
    // we've made a new row for you already.
    if (j == 0 && !first_loop) {
    // New week!!
    ds_echo (ds_template_new_week());
    // Make a row of that day!
    ds_echo (ds_template_day(i + 1, m, y));
    // This is not first loop anymore...
    first_loop = 0;
    // What is the next day?
    j ++;
    j %= 7;
    // Do the footer
    ds_echo (ds_template_main_below());
    // And let's display..
    ds_ob_flush();
    // Scroll it into view.
    ds_ce.scrollIntoView();
    // A function to show the calendar.
    // When user click on the date, it will set the content of t.
    function ds_sh(t) {
    document.form1.dropDownList.display = false; //this line not working
    // Set the element to set...
    ds_element = t;
    // Make a new date, and set the current month and year.
    var ds_sh_date = new Date();
    ds_c_month = ds_sh_date.getMonth() + 1;
    ds_c_year = ds_sh_date.getFullYear();
    // Draw the calendar
    ds_draw_calendar(ds_c_month, ds_c_year);
    // To change the position properly, we must show it first.
    ds_ce.style.display = '';
    // Move the calendar container!
    the_left = ds_getleft(t);
    the_top = ds_gettop(t) + t.offsetHeight;
    ds_ce.style.left = the_left + 'px';
    ds_ce.style.top = the_top + 'px';
    // Scroll it into view.
    ds_ce.scrollIntoView();
    // Hide the calendar.
    function ds_hi() {
    ds_ce.style.display = 'none';
    document.form1.dropDownList.display = true; //this line not working
    // Moves to the next month...
    function ds_nm() {
    // Increase the current month.
    ds_c_month ++;
    // We have passed December, let's go to the next year.
    // Increase the current year, and set the current month to January.
    if (ds_c_month > 12) {
    ds_c_month = 1;
    ds_c_year++;
    // Redraw the calendar.
    ds_draw_calendar(ds_c_month, ds_c_year);
    // Moves to the previous month...
    function ds_pm() {
    ds_c_month = ds_c_month - 1; // Can't use dash-dash here, it will make the page invalid.
    // We have passed January, let's go back to the previous year.
    // Decrease the current year, and set the current month to December.
    if (ds_c_month < 1) {
    ds_c_month = 12;
    ds_c_year = ds_c_year - 1; // Can't use dash-dash here, it will make the page invalid.
    // Redraw the calendar.
    ds_draw_calendar(ds_c_month, ds_c_year);
    // Moves to the next year...
    function ds_ny() {
    // Increase the current year.
    ds_c_year++;
    // Redraw the calendar.
    ds_draw_calendar(ds_c_month, ds_c_year);
    // Moves to the previous year...
    function ds_py() {
    // Decrease the current year.
    ds_c_year = ds_c_year - 1; // Can't use dash-dash here, it will make the page invalid.
    // Redraw the calendar.
    ds_draw_calendar(ds_c_month, ds_c_year);
    // Format the date to output.
    function ds_format_date(d, m, y) {
    // 2 digits month.
    m2 = '00' + m;
    m2 = m2.substr(m2.length - 2);
    // 2 digits day.
    d2 = '00' + d;
    d2 = d2.substr(d2.length - 2);
    // DD.MM.YYY
    return d2 + '.' + m2 + '.' + y;
    // When the user clicks the day.
    function ds_onclick(d, m, y) {
    // Hide the calendar.
    ds_hi();
    // Set the value of it, if we can.
    if (typeof(ds_element.value) != 'undefined') {
    ds_element.value = ds_format_date(d, m, y);
    // Maybe we want to set the HTML in it.
    } else if (typeof(ds_element.innerHTML) != 'undefined') {
    ds_element.innerHTML = ds_format_date(d, m, y);
    // I don't know how should we display it, just alert it to user.
    } else {
    alert (ds_format_date(d, m, y));
    // And here is the end.
    // ]]> -->
    <!--DateTime Picker code-->
    </script>
    Also I have to use DropDownList below this DateTime Picker. In the IE 6.0 "DropDownList" control comes in front of this calendar (this is a known problem in IE 6.0, that is form items appear infront of all other).
    And now I am trying to hide the form items as the DateTime Picker is shown and display them again as the calendar is closed. For this action I am using:
    document.form1.dropDownList.display = true / false in the "function ds_sh(t)" and "function ds_hi()"
    but its not working (not hide or unhide, no action).
    Maybe somebody could help me in this situation.
    Thanks in advance.
    br,
    Forumaic

    I replaced these to lines that not worked in the DateTime picker with this one:
    var obj = document.getElementById('ddlTest');
        obj.style.visibility = "visible";
    var obj = document.getElementById('ddlTest');
        obj.style.visibility = "hidden";And now everything working like it should be.
    Forumaic.

  • How do I change the font size of a data point label on a cfchart?

    I know I can control the x axis and y axis font with the font="" attribute of the cfchart tag.  But I want to change the font size of the data label in the chart series.  Is that possible?

    To specifically and fully answer your question, no, you absolutely cannot change the “font size” as a function of print.
    First of all, there isn't a single “font size” associated with a PDF file (and we assume you are referring to a PDF file since this is an Acrobat forum).
    Secondly, PDF is a final form file format meaning that the content is static in terms of location, size, etc. on the page. To change the point size of any particular text, you really need to go back to the source document and make the changes there.
              - Dov

  • How to get DATETIME value in a page?

    Hi,
    I have two pages.
    In page1, I have a table that contain MessageStyleText item(AuditTime) and the attribute data type is DATETIME .
    I want to pass AuditTime value from page1 to page2.
    I am passing the AuditTime value from page1 to page2 using Destination URI.
    The AuditTime value is 2008-11-11 12:45:31.0
    How to get the AuditTime in page2 so that I can get the exact value '2008-11-11 12:45:31.0' ?
    Please help.
    Thanks & Regards,
    Sagarika

    Hi
    I am passing the value using the following destination URI,
    OA.jsp?page=/uttara/oracle/apps/uttaraimc/audit/webui/Page2&auditTime={@AuditTime}&retainAM=Y
    In the database the AuditTime value is like '2008-11-11 12:45:31.0'
    Normally we are using pageContext.getParameter("auditTime"); to get the value which are passed in destination URI.
    Here if I'll use pageContext.getParameter("auditTime"); I am not getting the correct value.
    How to get the exact value?
    Thanks & Regards,
    Sagarika

Maybe you are looking for

  • High quality only looks good when in full screen

    I have a "15 MacBookPro using AE CC 2014.2.. So I typed some text within AE and dragged in a high resolution photo to make a simple video. My composition size was 1920x1080.  But the photo and text always look weird, sorta pixelated, unless they are

  • Airport Express shows green, no signal.

    So after finally moving into my new apartment, I decided to finally go wireless with my iMac G5 and my girlfriend's eMac G4. We practically skipped into the Apple store, purchased an Airport Express card and two airport extreme cards. And then it all

  • FunctionModule

    hi, my problem is related to the function module. regarding Cost centers. the change pointers concept is not useful for future dated costcenters .for that i will creat the new function module(zfm_..) .here my problem is wat are the export import etc.

  • Info in the basic html do not correspond to the detail html....

    Hi , Sometimes , i face up to the incosistency of info between the basic page http://forums.oracle.com/forums/categoryHome.jspa?categoryID=84 and a corresponding detail page regarding the last poster's name..... For example: General Database Discussi

  • Customer Conversion Issue

    Hi All I am doing Customer Conversion in 11i My requirement is that i want to create Ship to addresses in 2 operating units I checked the API apps.hz_cust_account_site_v2pub.create_cust_acct_site for any org_id parameters but it did not have any para