Query date format

This is probebly really simple but i cannot manage to sort
it. I have a site which tracks an update of a clients case. the
solicitors have certain steps they need to follow and they update
each stage with a short date. i have the short date format in
access. When it is displayed in Cf if gives me incorrect details.
For example i have the field cce which has the data 23/10/2007.
When it is displayed in Cf it gives me the following date.
1899-12-30 00:01:39. The code is <input name="pcce" type="text"
value="#cce#" size="12">. what can i do to make this correct.
Thanks

Use the DateFormat function
#DateFormat(cee, 'dd/mm/yyyy')#
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_c-d_29.html#11 03264

Similar Messages

  • PeopleSoft9.0, In PS Query Date Format Need to Change.

    In Peoplesoft9.0 PS Query we created the quries like SELECT TO_CHAR(A.ACCOUNTING_DT,'YYYY-MM-DD')
    FROM PS_VCHR_ACCTG_LINE A, but the result in PS Query like this
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    08/16/1999
    Format we given is YYYY-MM-DD, but in result the format is MM/DD/YYYY, how can i changes this.
    Thanks in Advance
    P.Ayyanar

    Instead of dragging and dropping ACCOUNTING_DT field follow the given steps
    1. Create a new expression
    2. Select expression type as charactor
    3. type the following expression TO_CHAR(A.ACCOUNTING_DT,'YYYY-MM-DD'), if you are using oracle database
    4. Drag and drop this expression in the select list
    You will see date in YYY-MM-DD

  • "Too Few Arguments" error when using Date Format

    I'm attempting to format some date information. I'm taking the following query:
    mysql_select_db($database_adventcms, $adventcms);
    $query_rsDatedetails = sprintf("SELECT * FROM tbEvents WHERE id = %s", GetSQLValueString($colname_rsDatedetails, "int"));
    $rsDatedetails = mysql_query($query_rsDatedetails, $adventcms) or die(mysql_error());
    $row_rsDatedetails = mysql_fetch_assoc($rsDatedetails);
    $totalRows_rsDatedetails = mysql_num_rows($rsDatedetails);
    and changing it to this:
    mysql_select_db($database_adventcms, $adventcms);
    $query_rsDatedetails = sprintf("SELECT *, DATE_FORMAT(datestart, '%b') AS whichMonth, DATE_FORMAT(datestart, '%Y') AS whichYear, DATE_FORMAT(datestart, '%D') AS whichDate FROM tbEvents WHERE id = %s", GetSQLValueString($colname_rsDatedetails, "int"));
    $rsDatedetails = mysql_query($query_rsDatedetails, $adventcms) or die(mysql_error());
    $row_rsDatedetails = mysql_fetch_assoc($rsDatedetails);
    $totalRows_rsDatedetails = mysql_num_rows($rsDatedetails);
    When I run it I get this error:
    Warning: sprintf() [function.sprintf]: Too few arguments in /home/iasindia/public_html/beta/newsandevents/eventdetails.php on line 60
    Query was empty
    which refers to the query line above. The odd thing is that same query works on a different query like this:
    $query_rsDates = "SELECT *, DATE_FORMAT(datestart, '%b') AS whichMonth, DATE_FORMAT(datestart, '%Y') AS whichYear, DATE_FORMAT(datestart, '%D') AS whichDate FROM tbEvents WHERE status = 'Live' AND datestart >= CURDATE() ORDER BY datestart DESC";
    $query_limit_rsDates = sprintf("%s LIMIT %d, %d", $query_rsDates, $startRow_rsDates, $maxRows_rsDates);
    $rsDates = mysql_query($query_limit_rsDates, $adventcms) or die(mysql_error());
    $row_rsDates = mysql_fetch_assoc($rsDates);
    But I can't get it to work on the $query_rsDatedetails above.
    Any help would be appreciated!

    The sprintf function is interpreting the date format type as an input. There are several solutions:
    http://stackoverflow.com/questions/5835534/mysql-query-date-format-and-sprintf

  • Date format in Query Result Window

    In recent versions on OSD (trying with V3.2.20.09 Build MAIN-09.87) I've been unable to change the date format for results shown in the query results window via the NLS settings in Preferences, it's the same for other users on v3 in my area. Can anyone advice on whether anything can be done to resolve this issue or is there a bug in recent additions of OSD
    Frustrating having a result show as 01-DEC-12 and I don't know whether it's 01-DEC-2012 or our default date of 01-DEC-4712 without having to hard code a to_char in my sql which I don't want to be doing all the time to analyse my results
    I have an old version 1.5.4 Build MAIN-5940 and changing the NLS settings in preferences refrects correctly in the query results window
    Any advice appreciated, Thanks

    Thanks, looks like it's permission, tried on a different database supposed to be the same and it works when I update the preferences or run the alter session statement. Call to my admins to get on the case
    Ta
    for anyone else having simular issues, help are the statements I've tried to confirm it's permissions
    alter session set NLS_DATE_FORMAT = 'DD-MON-RR HH24:MI:SS'; -- Original
    alter session set NLS_DATE_FORMAT = 'DD-MON-RRRR HH24:MI:SS';
    commit;
    SELECT *
    FROM nls_session_parameters
    Edited by: lakeuk on 14-Nov-2012 06:37

  • Date format in BI query

    Hi,
    We need to display a single date format independent of date format of SAP User settings. For ex: as below.
    In a current query the  date, depending on the user's configuration could appear as:
    dd.mm.yyyy (English format)         or        yyyy-mm-dd (Swedish format)        or        mm.dd.yyyy (American format)
    I need to change some of the queries date format as below.
    a) Change all dates in query outputs and parameters to the format YYYYMMDD
    b) Change all months in query outputs and parameters to the format YYYYMM
    c) Change all financial periods in query outputs and parameters to the format YYYYPPP
    Thanks,
    Jitu

    Hi
    I think u have to use the ABAP code at the query level.
    First take the date in one variable zdate_var  and then if u want the below , then
    data : zdate_var_year type d,
               zdate_var_mm type d,
              zdate_var_dd type d.
    zdate_var_year = zdate_var(4).
    zdate_var_mm = zdate + 4(2).
    zdate_var_dd = zdate + 6(2).
    YYYYMM = zdate_var_year , zdate_var_mm.
    LIke this u can have ur o/p as per ur wish,
    Hope u got it ,
    Thanx & Regards,
    RaviChandra

  • Date format mask in Enter-Query mode

    Hi,
    I'm developing a Form which is able to query the masterblock from a detail-item.
    The queryable detail-item is a date field and has a datatype: DATETIME. When a new record is entered the values in the date field are stored in the database like "18-10-2002 15:04:02"
    When the form is in enter_query mode the user must be able to enter 18-10-2002 (DD-MM-YYYY format mask, so without time mask). When execute the query with this date format the query is not able to find data.
    I used a Key-Execute-Query on the detailblock like this:
    SELECT 1.COLUMN
    , 2.COLUMN
    INTO :1.COLUMN
    , :2.COLUMN
    FROM TABLE.1
    , TABLE.2
    WHERE 1.COLUMN = 2.COLUMN
    AND TO_CHAR(1.COLUMN,'dd-mm-yyyy') = to_date(:avg.datum,'dd-mm-yyyy');
    Can anyone please help me?
    Regards,
    Ronny.

    Hi Ronny,
    I'm not sure to have got exactly your issue (especially why you have to use that select in master-detail query), but I suggest you to substitute
    ...AND TO_CHAR(1.COLUMN,'dd-mm-yyyy') = to_date(:avg.datum,'dd-mm-yyyy');
    with
    ...TRUNC(1.COLUMN) = TO_DATE(:avg.datum,'dd-mm-yyyy');
    To be fair, I would use it in the where clause, even if you set it dinamically.
    Let us know,
    Marco

  • Date format conversion in BEX query level

    Hi ,
          We had a date field in the numeric format like 735.020 in the cube level, but when we execute the query the values for thsi date field is changed in to date format like 31.05.2013.
    we are not having any conversion routines and the date fields are used directly in the query .

    Hi,
    Try the below class file or may be create a method in your controller. It will resolve your problem.
    package com.XXX.DateFormatForSAP;
    import java.util.Date;
    import java.text.SimpleDateFormat;
    public class FormatSAPDate {
    public static String changeDateFormat(Date sapDate) {
    String formattedDate = null;
    SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
    formattedDate = dateFormat.format(sapDate);
    return formattedDate;
    Try this code and let me know.
    Regards
    Mukesh

  • Wrong query results: due to date format?

    hello,
    I have oracle 11 and when I execute this query:
    select MYDATE from mytable order by MYDATE DESC;
    it get me a bad order:
    MYDATE
    25-MAR-09
    13-MAR-09
    10-MAR-10
    10-MAR-10
    31-JAN-10
    29-JAN-10
    28-JAN-10
    08-DEC-09
    07-DEC-09
    06-DEC-09
    05-DEC-09
    is it may due to a wrong date format?
    where have I to look out? init.ora?

    But, there is no problem at my end (Using Oracle 10.2.0.1 on win xp):
    SQL> create table t(mydate date);
    Table created.
    SQL> insert into t values(to_date('25-MAR-09','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('13-MAR-09','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('31-JAN-10','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('07-DEC-09','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('05-DEC-09','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('06-DEC-09','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('08-DEC-09','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('10-MAR-09','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('29-JAN-10','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('10-MAR-10','DD-MON-YY'));
    1 row created.
    SQL> insert into t values(to_date('28-JAN-10','DD-MON-YY'));
    1 row created.
    SQL> select * from t;
    MYDATE
    25-MAR-09
    13-MAR-09
    31-JAN-10
    07-DEC-09
    05-DEC-09
    06-DEC-09
    08-DEC-09
    10-MAR-09
    29-JAN-10
    10-MAR-10
    28-JAN-10
    11 rows selected.
    SQL> SELECT MYDATE FROM T ORDER BY MYDATE DESC;
    MYDATE
    10-MAR-10
    31-JAN-10
    29-JAN-10
    28-JAN-10
    08-DEC-09
    07-DEC-09
    06-DEC-09
    05-DEC-09
    25-MAR-09
    13-MAR-09
    10-MAR-09
    11 rows selected.
    SQL> SHOW PARAMETER NLS_DATE;
    NAME                                 TYPE        VALUE
    nls_date_format                      string
    nls_date_language                    stringCan you show us the output of
    show parameter nls_date;
    Regards
    Girish Sharma

  • Date Format in Visual Studio Query Result Window

    Most vendor tools let you change the date format to show datetime in its query results window.
    But .NET does not have this.
    The ability to change this should be in located in Tools|Options but its not there.
    Can it be added in the next release?
    ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-RR HH:MI:SS' does not work. btw.
    .NET and/or ODT over-rides it.

    Why would you expect Microsoft to write stuff for an Oracle plugin?! Why on earth would you want to see anything other than the actual raw data that YOU requested in the results of a query? Surely formating/displaying a datetime is a presentation layer thing not a database layer thing! If you're really that bothered re-write your SQL till you get what you want.

  • Date format in Query Extract - Urgent

    Hi,
      I'm using Query-Extract (RSCRM_BAPI) to extract query data and store it in separate location.
    While extracting the data into .csv ot .txt file, date will be displayed as yyyymm (200807). As per the requirement we should display the date in the format mmm-yyyy (Jul-2008).
    Please help me. its very urgent.
    Thanks,
    Varun

    Hi ,
    This issue can be solved by writing a routine in update rules pls take the help of abap experts to solva this
    this is not a big issue for them
    Hope i have guided u properly
    Pls assign me points my boss ??
    Regards ,
    Subash Balakrishnan

  • How to convert milliseconds to date format in sql query

    Hi All,
    The following code is in java.     
    String yourmilliseconds = "1316673707162";**
    Date resultdate = new Date(Long.parseLong(yourmilliseconds));
    could you plese tell me how to convert milliseconds into date format in query and comparing with another date like(sysdate-3)

    Hello,
    http://stackoverflow.com/questions/3820179/convert-epoch-to-date-in-sqlplus-oracle
    Regards

  • How i can change date format in the query

    I have made a query and Document date format is DD/MM/YYYY but i want Document date Format as YYYYMMDD. Please help me out as soon as posible.
    Thanks is advance.

    Hi Harman,
    By default query shows same date setting what is maitianed in SU01 (user maintenance). User can set the dates as they want. Ask user to log in BI system and go to system> User Profile> Own Data. They can select the date format and save the changes.
    If you want to display same setting for all user, please select the format whenever you create any users and change for existing users.
    Regards,
    Kams

  • Change date format in reporting (query)

    I need to change date format from dd.mm.yyyy to dd/mm/yyyy in reporting (query)

    Hi Suresh,
    Go to transaction su01d in that enter your user.
    Now go to defaults and change the date format.
    Ya but this format will be user specific, so if you want everyone to see that format you have to change it for all.
    Regards
    Mansi

  • Date formats in BI Query designer

    Hi gurus
    We have enhanced our cube 0sd_co3 where we have taken a number of dates such as Railway Receipt date, Actual Goods Issue date, LFdat, thses are only few examples. Now our reporting scenerio demands reporting based on thses dates as given in our time dimensions such as
    YYYYMM        Qty
    but not based on the date mapped in the time dimension in the cube. but based on these dates
    in oracle we have the to_char function through which we change the format of date while writing sql query
    so if there is any option of changing date format in query without changing the modelling
    Pl suggest
    Thanks
    Shivani

    Hi,
    You can create new characteristic of char number 6 . Include it in the data target. Populate it via a update rule ( Routine).
    Use input as standard date (Railway Receipt date) and then pass the value to the new char in the required format (YYYYMM). Follow same thing for other dates also.
    Let me know if you have doubt.
    Regards,
    Viren

  • Change display Date format from 06.2011 to june 2011 in output of Query

    Hi All,
                Change display Date format from 06.2011 to june 2011 in output of Query  Execution. i used time charcteristics 0calmonth in query, output display is coming 06.2011, i want to display output in june 2011 format, anyone tell me how to convert this Date format.

    Hi Nandish,
    as tibollo said you just need to mark 0CALMONTH with text in RSD1.
    Kindly note that you don't need to do data load for this object.
    It will automatically derive by system.
    Just change the Info object 0CALMONTH in RSD1, Go to Master Data/text column and check mark on with text.
    Then activate it.
    Regards,
    Ashish

Maybe you are looking for