Date Format for Spry data set sort

Hi
Just feeling my way through the use of Spry Datasets for the
first time and have a couple of issues hopefully someone with more
knowledge of it than me know the answer to.
I had an issue with my Spry Dataset initially that it would
not work in ie7 but was OK in FF3.
After some mucking round I realised the error I was getting -
albeit obscure in IE was telling me it was a date format issue in
my data set.
The db data I am playing with here is fairly simple: I have a
couple of text fields, an integer field that contains the
unixtimestamp of the entry (its a simple diary application) and a
formal date field that holds the same date in mysql's date format.
When I display the date in the dataset I do so in the format
"23rd May 2009" (as an example)- I code this using phps date
function in my xml query.
I had set this field to date format in the Spry dataset
conditions but IE seems to barf on this- I can change it to
textstring but then my sort is done on Alpha/Numeric sort of the
first character in the date field which is rubbish.
I only display the date in this format and one of the other
text fields in my dataset- the unixdate is for programmatic
purposes not general display so I cannot sort on this field if its
invisible. How can I acheive a date based sort with this set up- or
what date formats does Spry code prefer for date sorts? (My client
wants the date to show as I have explained). Many thanks. I have a
second query which I will post separately!
Kenny

"Tanushiheadbash" <[email protected]> wrote
in message
news:gqa70o$iat$[email protected]..
> I think I follow what you are saying and in fact I think
its what I
> already
> have. I have set the sort order to use the unixtime when
the page
> initially
> loads and thats OK.
I am sorry, but you aren't following my explanation. English
isn't my mother
tongue, and I am not able to explain it any better.
> However what I need to be able to do is to have the
AJAX/Javascript sort
> (done in this case with Spry- ) to sort on the date when
the column header
> is
> clicked. The problem I have is the date format in this
visible column is
> in
> DDth Month YYYY format and Spry does not recocnise this
as a date format-
> it
> wants it as a string ( or ie gives an error). Maybe its
not possible what
> I am
> trying to do- just thought there might be a clever way
to implement this.
You can take a look at this page:
http://visual.unipv.it/tmt_calendar/admin/reports/events.cfm
Even if all the dates here are incidentally using the
yyyy-mm-dd format, the
dataset display the date from the "start_date_formatted"
field:
<td><a href="javascript:"
onclick="showUpdate('{event_id}')">{start_date_formatted}</a></td>
But uses another field to sort the table:
<th scope="col" spry:sort="start_date">Start
date</th>
You can have the same date, using two different formats,
inside two,
separated dataset fields. One is used for display, the other
one is used for
sort.
You may try to read again my previous explanations, look at
the code in the
page above and see if you get the idea.
Massimo Foti, web-programmer for hire
Tools for ColdFusion, JavaScript and Dreamweaver:
http://www.massimocorner.com

Similar Messages

  • Date format for parameter data entry

    I've just started working on MS SQL Server 2008 for the first time and am using Crystal XI11.5.  I have a date parameter used to pick data.  It works fine but the users are used to entering dates in mm/dd/yyyy format but this parameter forces users to enter using yyyy-mm-dd.
    Normally I am not too concerned as there is the calendar but I have a couple of keyboard users who would like to just enter in the date format they are used to.   I can't find any spot in Crystal to change the data entry format for the dates.
    I do understand that SQL Server does store dates in yyyy-mm-dd format so is this why I only have this option?  Any way to change it?  I do have dates in the report presenting in d-MMM-yyyy format without problem, it's just the date entry prompt.
    TIA rasinc

    The later versions of CR will not allow you to directly edit the SQL statement. You actually have to add a Command and remove the tables from the data source. You can, if you wish, copy the SQL from the "Show SQL Query" and paste it into the Command.
    The reason I tried to delete my previous comment is because it dawned on me (after I made the comment)  that the date picker control itself, won't accept any format other than YYYY-MM-DD.  So, while you can write the SQL to accept a variety of date formats, you won't be able use any of them while using that control.
    The CR date picker control can be found (and therefore replaced by someone w/ more guts than me) in the following locations...
    C:\Program Files\Business Objects\Common\3.5\crystalreportviewers115\prompting
    C:\Program Files\Business Objects\Common\4.0\crystalreportviewers12\prompting
    Jason

  • How to define the date format for this date string

    2006-11-13 00:00:00.0
    How to define the date format in control file for sqlldr. "yyyy-mm-dd hh24:mi:ss" or "yyyy-mm-dd hh24:mi:ss.FF1" does not work
    thanks,

    SQL> desc t
    Name                                      Null?    Type
    TS                                                 TIMESTAMP(6)
    SQL> !cat t.ctl
    load data
    into table t
    truncate
    (ts timestamp "YYYY-MM-DD HH24:MI:SS.FF1")
    SQL> !cat t.dat
    2006-11-13 00:00:00.0
    SQL> !sqlldr userid=scott/tiger control=t.ctl data=t.dat log=t.log
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Sep 7 11:19:28 2007
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 1
    SQL> select * from t;
    TS
    13-NOV-06 12.00.00.000000 AMBest regards
    Maxim

  • AD 11g Trusted Recon is failing due to invalid Date format for Start Date

    We are using OIM 11g with AD 11g connector.
    we have mapped "whenCreated" attribute of AD to "Start Date" in OIM. We ran Trusted Recon, the recon failed due to invalid date format.
    we got the following error :
    Caused By: oracle.iam.reconciliation.exception.InvalidDataFormatException: Invalid data - 10/19/2012 10:33:30 AM against Date format yyyy/MM/dd HH:mm:ss z for key Start Date
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.convertReconFieldsToOIMFields(ReconOperationsServiceImpl.java:1610)
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.ignoreEvent(ReconOperationsServiceImpl.java:548)
    at oracle.iam.reconciliation.impl.ReconOperationsServiceImpl.ignoreEvent(ReconOperationsServiceImpl.java:535)
    at sun.reflect.GeneratedMethodAccessor9326.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.iam.platform.utils.DMSMethodInterceptor.invoke(DMSMethodInterceptor.java:25)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    Thanks.

    Caused By: oracle.iam.reconciliation.exception.InvalidDataFormatException: Invalid data - *10/19/2012 10:33:30 AM* against Date format yyyy/MM/dd HH:mm:ss z for key Start Date
    Error is because of invalid date format.
    You need to bring data in required format. As I remember you can configured it in one of the AD configuration lookup.

  • Supported date formats for sorting

    Can someone point me to a document describing the supported
    date formats for sorting? I mean, how should I format a date column
    in an XML dataset in order to have this column correctly sorted
    using the Spry framework?
    Thank you and sorry if the question is trivial.

    Thanks, what I have done for the moment as a temporary
    solution is to use the two date formats and have them both inside
    the one cell in the table (the column for the sortable date
    yyyy-mm-dd). In my CSS I have created a style for the first date
    that has it's visibility as hidden. That way it's sorting the Date1
    but only Date2 is being shown to the users as the other cells have
    more than one line of text it doesn't look too off centre.
    <div spry:region="ds2">
    <table width="662">
    <tr>
    <th width="127" class="eventhead"
    spry:sort="Date1">Date</th>
    <th width="151" class="eventhead"
    spry:sort="Type">Type</th>
    <th width="146" class="eventhead"
    spry:sort="Title">Title</th>
    <th width="189" class="eventhead"
    spry:sort="Venue">Venue</th>
    </tr>
    <tr spry:repeat="ds2" spry:setrow="ds2">
    <td height="53" class="event">{Date2}<span
    class="eventhide">{Date1}</span></td>
    <td class="event">{Type}</td>
    <td class="event">{Title}</td>
    <td class="event">{Venue}</td>
    </tr>
    </table>
    </div>
    </div>
    It seems to be working for the moment...

  • Setting date format for the entire SQL Server installation - SQL Server 2008 R2-2012

    Hi,
    I need to safeguard the behaviour of SQL codes that inserting into SQL tables with some date columns. For this purpose, I need to change the date format for the SQL instance and not using CONVERT and CAST.
    I've seen the SET DATE FORMAT statement, but if I use it, could I solve my problem?
    Thanks

    The language setting is related to the database user.
    BOL: "DEFAULT_LANGUAGE = { NONE | <lcid> | <language name> | <language alias> }              
    Specifies the default language for the new user. If a default language is specified for the user and the default language of the database is later changed, the users default language remains as specified.
    If no default language is specified, the default language for the user will be the default language of the database. If the default language for the user is not specified and the default language of the database is later changed, the default
    language of the user will change to the new default language for the database."
    LINK: http://technet.microsoft.com/en-us/library/ms173463.aspx
    The default language setting can be overridden by SET LANGUAGE for the session:
    http://technet.microsoft.com/en-us/library/ms174398.aspx
    Example:
    SET LANGUAGE us_english; -- mdy
    SELECT CAST ('12/13/2014' as DATE); -- 2014-12-13
    GO
    SET LANGUAGE british; -- dmy
    SELECT CAST ('12/13/2014' as DATE);
    GO
    (1 row(s) affected)
    Changed language setting to British.
    Msg 241, Level 16, State 1, Line 2
    Conversion failed when converting date and/or time from character string.
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Date formats for SQL statements used by recordset object

    Hi,
    Date formatting appears to be quite problematic for Business One.  I did a forum search for date issues and I don't think I saw any of them with an "answered" status.  I have an issue with formatting a date for the creation of an SQL statement that the DI sends to SQL Server 2005.  I need to format a date so that the localization parameters don't matter for either the client machine or SQL Server's machine.  We don't have a problem as long as our machines are localized as USA.
    I have PL 22 and I have a form - ours - where I use the Today() function to fill a date field.  So this is a date that is not entered by the user.  The result of this function is consistent with the localization parameters on my machine.  We have two other date fields on the form where the user must type in the date. 
    As a test, I changed my machine to the UK parameters.  I then set up the language parameters of Business One for English(United Kingdom).  I changed the date format specifications in Business One so that its format is dd/mm/yy.  I then brought up the form and the field that is formatted by the above function arrived in the form's field as dd/mm/yy.  I then typed in the two other dates in the same format and added the record to the database.  The form's table is user-defined. 
    I dismissed the form then brought it back up loaded with the new record.  The date that was entered by the function appeared in USA format (mm/dd/yy).  The dates that were typed in appeared in the Business One format (dd/mm/yy).  This of course is not consistent.
    When I looked at what got into the database, the formats were the opposite.  Weird!  To make matters really confusing, I run an SQL statement within SQL Server Mgt Studio, and use the WHERE clause to filter on the date that was based on the function.  It didn’t matter what format I used for the WHERE clause, the record came up.  Does anyone have any idea about how I can ensure that I always use the correct date format for SQL statements passed by Business One to SQL Server regardless of where in the world the application is being run?
    Thanks,
    Mike

    Ian,
    Here's what I'm concerned about:  I’m using the date in a “WHERE” clause.
    Assume the date is Aug 3, 2007.
    "SELECT * FROM Table WHERE StartDate > ‘8/3/2007’"
    OR
    "SELECT * FROM Table WHERE StartDate > ‘3/8/2007’"
    If the client machine is set up as USA, the today function will provide the date as formatted in the first query.  If the database server is setup as let’s say the UK, I believe that SQL Server query parser will interpret the date as Mar 8, 2007.
    If the client machine is set up as UK, the today function will provide the date as formatted in the second query.  If the database server is setup as let’s say USA, I believe that SQL Server query parser will also interpret the date as Mar 8, 2007.
    In both cases it would be wrong.
    I know I could use the DATEPART function to get the three parts and this will make the code indifferent to the localization specs of the client machine.  I need to then be able to concatenate those date parts for the “WHERE” clause so that the localization specifications of the database server don’t matter.
    Thanks,
    Mike

  • To accept all date formats for variables

    Hi,
    I am getting a vadidation message on refresh of a query on entering European date format in the selection criteria "Please enter value in permitted format for variable XXXX"
    I need date to accept all date formats for variables to execute query.
    Currently US date format has been accomodated, On entering European date format i get the above validation message.
    Please suggest how do i supress this validation message or any other thoughts on the same.
    If anyone experienced the same before or applied any notes plz send the SAP Note number for the same. I am currently on BW 3.5.
    Message was edited by:
            tyson m

    tyson,
    why dont you control the date display through the user creation / user details option - then your date entries should sort themselves out.
    Arun

  • Where does one manage date formats for display and input

    the user specification is that dates be displayed as YYYY-MON-DD. Is there a config or properties file which contains the date format for display? Is there a calendar drop-down that can be positioned next to a date input field for a question on a screen?
    Thanks,
    Allan

    Hi Allan,
    Curious why the rule project wasn't created with "English (Canada)" initially? If your project is English (UK) with the default configurations for that locale, then I assume your currency values are appearing in OWD with the GBP symbol (£) instead of a dollar sign ($)?
    As for the impact of switching… I highly recommend getting confirmation from the OPA Dev team before doing it, but in the meantime, if you wanted to experiment on your own with a separate test rulebase (as opposed to whatever formal rulebase you're working on), here are my observations from an initial look… (FYI, I'm an experienced OPA rulie, but I'm non-technical and not in the Dev team, so best to check with them!)
    I poked around the language parser files and saw that English (UK) has an English (UK) verb list, whereas English (Canada) uses the English (US) verb list. The vast majority of verbs are identical in all the variations of English, however, there are a couple which differ. So if you've used any verbs which have a different spelling between the 2 lists, there may be some attribute text to tweak, e.g.
    - English (UK): the person travelled to Australia
    - English (US): the person traveled to Australia
    - English (UK): the person cancelled the reservation
    - English (US): the person canceled the reservation
    I saw some other different files between English (Canada) vs English (UK), but didn't notice anything in them which I'd expect to impact the rulebase.
    As for how it might impact other components:
    * screens file and the properties file – May be some tweaking depending on how you addressed the verb spelling issue above.
    * regression test files – May be some tweaking depending on how you addressed the verb spelling issue above.
    * messages.(locale).properties – The default messages.(locale).properties file appears to be based on the Language setting of the Project. I just tested this and OWD used a different messages.(locale).properties file when I changed the Project Language (OPM | File menu | Project Properties | Common Properties | General | Language).
    * Siebel Connector – don't know what the impact would be.
    OPA Dev team – Can you review what I've said here? And add any relevant further detail?
    Cheers,
    Jasmine

  • Date Format for Language

    Hi all,
    is there any possibility to customize the default date format for the portal for the languages?
    When I set the user language to EN, date format for EN is default MM/dd/yyyy. I would like to have dd MMM yyyy (like 12 Aug 2005).
    Thanks in advance
    balop

    Hi peter,
             I thought you wanted to change the date format in the webdynpo implementation(coding).Now I got what you wanted ie date in ur reqd format from the picker UI itself.
             I really dont see much support in Webdynpro Date picker UI as of now for ur requirement.
            Anyway thanks for giving me a good question to think )
    Rdgs,
    G

  • Date Format for the input Variable

    Hi all,
    I got an issue with Date format we enter in the input variable screen for the BEx Analyzer.
    We have given a format of MM/DD/YYYY. But when the users accessed the report, it is not taking the format of the variable i.e MM/DD/YYYY but it is taking the format of the users system.
    If the user's system format is DD/MM/YYYY, it is accepting the input inthe same format only.
    Why this strange behaviour?
    My questions are
    Is the input for BEx system specific? or variable specific?
    Rgrds
    Kumar

    Hi,
    I think it is user specific... you can maintain the date format for user ....
    Go to SU01 transaction or.. Go to SYSTEM -> User Profile -> Own data
    Here in defaults tab you can see the date formet for user...
    Hope this helps...
    Thanks,
    Vikrant Mahajan

  • Invalid date format for 'Created' field in the getVersions web service Response.

    Hi all,
    I am trying to get all versions for selected document by calling getVersions method Versions.asmxweb service, but getting ‘Created’ date attribute value is in the format "29-05-2012 12:01"
    but I am expecting either one of the following date formats.
     1.      yyyy-MM-dd HH:mm:ss  or  yyyy-MM-ddTHH:mm:ssz
     2.      MM/dd/yyyy HH:mm a   (a means AM/PM)
     3.      MM/dd/yyyy
     4.      yyyyMMdd HH:mm:ss
    where do I need to change?
    what are all the formate will be support by SharePoint?
    please find attached response xml of getVersions call.
    <results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
        <list id="{6A6F6CD1-2E9C-44CC-B1F5-56G7JB5C8778}"/>
        <versioning enabled="1"/>
        <settings url="http://hbngjfgj47s20/reg/_layouts/LstSetng.aspx?List={7S6F6CD1-2E9C-44CC-B1F5-KO9J8Y7Y6H78}"/>
        <result version="@0.3" url="http://vmesxsrv47s20/register/Shared Documents/Parent/child/my_doc" created="29-05-2012 12:01" createdRaw="2014-12-02T12:46:02Z" createdBy="my_dom\agi_sharepoint"
    createdByName="AGI_Sharepoint" size="288" comments=""/>
        <result version="0.1" url="http://hbngjfgj47s20/register/_vti_history/1/Shared Documents/Parent/child/my_doc" created="29-05-2012 10:01" createdRaw="2014-12-02T10:55:18Z" createdBy="my_dom\my_sharepoint"
    createdByName="my_sharepoint" size="288" comments=""/>
        <result version="0.2" url="http://hbngjfgj47s20/register/_vti_history/2/Shared Documents/Parent/child/my_doc.txt" created="29-05-2012 11:01" createdRaw="2014-12-02T10:59:25Z" createdBy="my_dom\my_sharepoint"
    createdByName="my_sharepoint" size="288" comments=""/>
    </results>
    Kindly help me on this.

    Hi,
    According to your post, my understanding is that you want to change date format for ‘Created’ field in the getVersions web service.
    Per my knowledge, you can get the date format for ‘Created’ field as “MM/dd/yyyy HH:mm a”.
    For more information, you can refer to:
    Versions.GetVersions Method (Versions)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to change date format for prentation variable in Formula

    Hi experts.._
    I need to change date format for presentation variable in formula..
    my dashbord date prompt format: mm/dd/yyyy(i have created one presentation variable for this prompt: pv_date)
    now i need to show it as : month-dd-yyyy
    Thanks in advance
    Regards
    Frnds

    Hi Kishor...Thanks for reply...
    But i need to change my precentation variable date formt...
    i need to write one text like: 'Year to dd/month/yy' in one column formula..
    So how can i achieve it..

  • How to change date format for prentation variable

    Hi experts
    In my prompt the date format is MM/DD/YYYY . I have created one presentation variable for that but i want to use this in Formula as well in Title as: DD-MON-YY
    So how can i achieve it..
    Thanks in advance
    Regards
    Frnds

    Hi
    i think this can't be done through any code like oracle uses to_char, to_date function.
    Just follow this
    http://oraclebizint.wordpress.com/2007/12/19/oracle-bi-ee-101332-dates-dates-and-dates/
    With this, wherever you have this column, you will be getting this format dates..
    if you don't want in reports you can change it by mentioning the data format for that paricular column in report, but for the same column, if you want different format at different places (for prompts), you can't do that..

  • Help in date format for transaction F-01

    Hello Experts,
    I am currently modifying a report wherein it posts document using
    transaction F-01. Now, I am getting an error wherein it says:
    Direct input date: Date 04162007 is incorrect. The document has not
    been created.
    Now, how can I modify it in such a way that whatever format of the date is,
    it will be correctly translated to the proper format for F-01. For example,
    in my selection screen i enter it as 16.04.2007 and other users enter it as
    04/16/2007. Hope you can help me out here guys. Thank you and take care!

    Hai,
    You can enter any date format.
    But you have to validate the date format.
    The date format depends on the settings.
    The format code can be known by the <b>USR01</b> with <b>DATFM</b> field.
    So<b> select</b> that field value.
    <b>Depending</b> on that type(1 to 6)
    write your conversion code like:
    Case date_code.
      when 1.
         do convwersion here.  
      when 2.
    when 6.
         do convwersion here
    endcase.
    Hope now you can do with any date format.
    <b>Reward points if it helps you.</b>
    Regds,
    Rama chary.Pammi

Maybe you are looking for

  • Purchase Requistion,Purchase Enquiry, Sales Enquiry,Capacity Planning & Sch

    Hi All, I am working in SAP business One for quiet long time as Functional Consultant and i am very much aware with its design. And Now SAP is bringing SAP HANA also for Mid Size Company or you can say in SAP Business One. BUT ............... In any

  • Can we run a servlet application on mobile?

    Hi, I'm new to servlets and mobile web as well. I want to design an application which user can access through mobile and as well as dekstop. 1.) Can we access a web application designed through servlets and JSP via mobile device (e.g, PDA and mobile

  • Flash disappears when template upadated

    For some reason, when I update a template and save the changes globally, my Flash .swf disappears in the pages based on the template, even though it works just fine in the template? What gives? Are .dwt files buggy?

  • Problem: Audio from the video plays, but video does not show.

    Hi, I used the following code to play the video. The audio from the video plays displaying the player but there is no visual. There is no problem with the video as I have tried several other videos with .mpg and .mov extensions. import javax.swing.*;

  • After upgrade to 10.4 thumbdrives/cdrom/ethernet port do not work

    so after upgrading a powerbook from 10.2 to 10.4 thumbdrives don't automatically mount and cdroms don't show either.. I can go through disk utility and mount the thumbdrive manually .. but then when I take it out and put it back in it does not work .