Convert Date stored in MYSQL to date flex can use

Hello All.
I am trying to finish a simple log in script for a program i am working on.
Its using amfphp to check a mysql database to ensure that the username and password that the user enters is in the database and flagged to allow them to log in,
I have all this working fine.
However the database also has a table named "Date" that contains a date in the format os DD/MM/YYYY  this date is generated by flex in a process earlier.   The field type for this date field is a varChar.
My flex application also has a variable that contains the current Date. In the same format.
        <mx:DateFormatter id="DateDisplay"  formatString="DD/MM/YYYY"/>
          [Bindable] private var today:Date = new Date();
and i have a label that displays it using the code below.
DateDisplay.format(today)
Now what i want to do is when the user clicks the log in button, in the result of the function that is run, i want to convert the date stored in the mysql table to a date variable so that i can compare it witht he actual date.   So that the user can not log in once the date has expired.
The result function is as follows
protected function qrycandidateLogin(event:ResultEvent):void
                if(event.result.length > 0 && event.result[0].Taken =='Yes') {
                    Alert.show(LoginError,"Error");
                else if (event.result.length > 0 )
                    viewstack1.selectedChild=welcome;  
                    userArray = event.result as ArrayCollection;
                else
                    Alert.show("Please consult an account admin.", "Login failed");
So i need to add the code to the first "Else IF" statement.  to ensure that the date hasnt expired.
If anyone can help that would be great !
Thanks
Dave

I have been working on this and had some advancement but I am still having problems.
I added a bindable variable - [Bindable] public var SelDate:Date;
and added the following code into my result function
    SelDate= DateField.stringToDate(event.result[0].date, "DD/MM/YYYY");
however when i check what this SelDate variable then holds it comes out as
Wed Jan 20 00:00:00 GMT+0000 2010
the date is correct becuase my database value is 20/1/2010
But i dont want all the time etc,  but when i change the "DD/MM/YYY "   it then displays nothing.
Any ideas?
Thanks

Similar Messages

  • Does Flex can use Wamp as server?

    I'm new to Flex mobile development and I can't find a way to connect my project with wamp server and confused that flex can retrieve datas from multiple tables from web server. Can anyone help me please

    Thanks, Curran. it make sense.
    Actually, why i want to ask this question is: we want to hookup the search function on sharepoint online page (e.g: we hookup the function of
    executeQueries of sp.search.js), capture user's query string and filter the query string based on policy by KQL. it works now. we just consider if MS change the implementation search function of sp.search.js somehow, 
    MS don't use the
    executeQueries anymore for search page, our solution is fail, we need to know the accurate change plan and change our solution
    corresponding. it is just like a
    reverse project.
    Could you give me some feedback or suggestion about this?
    Best regards
    Tonny

  • How can I setup Datalist's itemrenderers in Flash catalyst so Flex can use it as Skin ?

    Hello Everyone !
    I'm struggling with Flash Catalyst / Flex, as long as repeating google request in the objective to find an answer, but nothing so far...
    Here is the deal : i want to have a clear Workflow between Catalyst and Builder. Therefore, i have two separates projects : one is modified by catalyst only and contains all my application's skins and design. The other one is edited by Flex Builder and contains all the logic. But i run into a very annoying problem, when it comes to Datalist !
    I have an itemrenderer in a datalist that displays 3 information in 3 differents fields. Catalyst handles this good with it's conception time data panel. But, when you look at the source code, text properties of the created itemrenderer are binded to some stupide data object : {data.text1}, {data.text2}. That's great, but... In my Flex application, the real data object is more like data.name, data.firstname, data.score...
    Is there a way i can tell Catalyst to use some {data.name} for its binding, so when the project is imported into Flash i can use Catalyst's generated code as "Skin" instead of modifying the catalyst's generated code ? That would break the workflow making iterative work impossible ?
    Thanks in advance for information sharing or any solution to this...

    There is no ddns setup in the TC so how are you going to get your public IP??
    Port forwarding works ok.. give us a few screen shots of what you are doing..
    And of course you need to make sure the target IP has a static IP address.. preferably set on the TC itself.
    Overall though the Cisco router is probably better for this job.. just bridge the TC and use it as a backup device.. which is much closer to what it is in reality.

  • How can i convert an ICO icon file to something I can use?

    I downloaded a new icon for the game Quinn, but it is only in ICO format, I need to convert it to either an icns, or just an icon (so i can copy and paste it onto Quinn) But a google search brought up no way to convert ICO to any kind of usable Mac icon
    Any help?

    You can use GraphicConverter to convert ICO into other image formats.

  • How to convert mp3 software instrument samples to format garageband can use

    Hi and thanks in advance.
    I'm using GB '08 on OSX 10.4.11 w/ a G4 MDD. ( Sorry folks,  This is the setup that I have and cannot buy a new computer or software at this time)
    I'm pretty new too DAW and all of this but want to compose music with traditional orchestra sounds as well as what GB offers.
    I have found Muse Score and I can get some pretty good results for writing but I want to expand the software instrument voices that GB has.
    I found  http://www.philharmonia.co.uk/thesoundexchange/make_music/samples/library/
    and they have some pretty good sounding software instruments for free, except that they are in mp3 format.
    I did some reading and see that GB understands a different format for this. I put some of the sounds into the correct GB folder as a test and result is of course no go. I see that GB uses exs and cst files in addition to wav and aff files.
    How do I convert mp3 software instrument samples to the formats garageband can use? Is there a way? What would I need to do this?
    Thanks again..

    The first step would probably be to convert the samples into AIFF files, that's what GB's sample files are in.
    But so far that's only a collection of samples - what you need is a sampler file that tells the software which sample to trigger with which key (the .exs files in GB's instrument library).
    Since your software is old, t works pretty well with soundfonts (the latest versions have problems), so you might try this software to create them:
    http://sonicamigos.com/polyphontics/
    All about soundfonts:
    http://www.bulletsandbones.com/GB/Tutorials/SoundFonts.html
    P.S.: The softare costs $60, but you can create 10 instruments for free.

  • How to convert data type while using @variable function

    Hi Gurus,
    I have a query.
    i have created a Derived Table and the statement is given below.
    select 1 as SENSITIVITY_LEVEL,1 as SUBSENSITIVITY,@variable('US_T') as NITEMS, ...........
    here  in @variable('US_T') "US_T" is hard coded value. I want to change to data type of hard coded value as numeric or integer
    i am using sap BI 4.0 universe design tool.
    Thanks in Advance.
    Regards,
    Jeet

    Hi Jeet,
    Since it is text you can't convert into number.
    Can you please let mw know the exact requriement of yours?
    why you need this
    Thanks,
    Swapnil

  • Is there an FFT program (that logs data) I can use for accelerome​ter testing

    Application is ... sensing vibrations from a downhole (drilling rig) air hammer tool. Need to log the data and distinguish the frequency fo the tool vibration from the drilling string vibration. Hammer tool noise is about 28 Hz.

    Thank you for the question. There is an excellent LabVIEW tool that will distinguish vibration frequencies from one another. This is the Order Analysis toolset. It uses a once per rev (or multiple per rev pulse) as a base or fundamental frequency and is able to separate out the vibration signatures at harmonics and sub-harmonics. Standard LabVIEW or LabVIEW with the Datalogging and Supervisory Control Toolset both work well with the LabVIEW Order Analysis tools installed and working. I would be happy to provide example code, or discuss the application in more detail with you.
    Sincerely,
    Preston Johnson
    Business Development Manager
    Industrial Applications (Machine Vibrations)
    National Instruments
    512-683-5444
    [email protected]
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • How do I convert old imovie .mov files to files I can use in imovie 9.0.9?

    How can I convert files from archived movies (.mov files) made on iMovie so I can edit them on the current (9.0.9) version of iMoview that I have? My Mac is version 10.10.2.

    Hi billfromjohnston, 
    You should be able to import Quicktime movies (.mov files) into iMovie.  Are you getting an error message when you try?
    iMovie '11: Import video from movie files
    https://support.apple.com/kb/ph2153?locale=en_US
    Regards,
    - Judy

  • How to convert date which is coming from a file

    Hi All,
    I am reading the content from the file in which date is also one field, but i am while inserting into the database i'm getting an exception because it is not able
    to insert into the database because the database date format is different from the one which is coming from a file.
    The datatype value of the database is Date.
    Can anyone help me on this if anybody having an idea.
    Regards,
    CH

    Hi,
    Even if I'm using JavaEmbeddedActivity also i'm getting an error. Please have alook at the below code once
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    public class ConvertDateToStringExample {
    public static void main(String args[]){
    DateFormat dateFormat = new SimpleDateFormat("dd-nn-yyyy hh:mm:ss");
    //to convert Date to String, use format method of SimpleDateFormat class.
    String strDate = dateFormat.format(getVariableData('inputVariable','payload','/client:process/client:Date'));
    System.out.println("Date converted to String: " + strDate);
    Error Message:
    Error(21,33): Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "DateProcess" of composite "default/DateProcess!1.0"
    The class path setting is incorrect.
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    Well it's not at all allowing me to insert the format while passing the input arguments.
    Regards,
    CH

  • LSMW problem during display converted data

    Dear Expert,
    We have problem in LSMW during display converted data.
    When using display converted data, the output will show many of rows based on data content.
    For example, contains 6 rows. But when we want to see details of the data for one row (example row 2) by double clicking on it, the problem occurs, the output will show the details of the data from the last row (row 6).
    Please your advice.
    Thanks and Regards

    Hi,
    There seems to be sorting issue. Do you have dependency on data while executing the script?
    how about reading the data , is it getting uploaded correctly?
    Regards

  • Crystal Data Conversion Issue (Error converting data type varchar to datetime)

    Hi,
    I can run stored procedure without error in SQL Server using my personal credentials as well as database credentials.
    I can also run Crystal Report after connecting to Stored procedure without error on my desktop using my personal credentials as well as database credentials.
    But when I upload the crystal report in BOBJDEV and when I run using database credentials report fails saying that "Error in File ~tmp1d1480b8e70fd90.rpt: Unable to connect: incorrect log on parameters. Details: [Database Vendor Code: 18456 ]" but I can run the crystal report successfully on BOBJDEV using my personal credentials.
    I googled (Data Conversion Error Message) about this issue & lot of people asked to do "Verify Database" in Crystal Report. So I did that, but when I do it I am getting a error message like this:
    Error converting data type varchar to datetime.
    Where do you think the error might be occurring? Did anyone faced this kind of issue before? If so, how to resolve it?
    (FYI, I am using Crystal Reports 2008, & for stored procedure I have used SSMS 2012 )
    Please help me with this issue.
    Thanks & Regards.
    Naveen.

    hello Naveen,
    since the report works fine in the cr designer / desktop, we need to figure out where you should post this question.
    by bobjdev do you mean businessobjects enterprise or crystal reports server? if so please post this question to the bi platform space.
    -jamie

  • Converting date time string to double data

    I have to plot a bar chart. The VI accepts only 2-d double data. My X- axis is date timestamp and Y- axis is the double data.
    Bt I am unable to convert the timestamp value to double.
    Anyone can suggest anything ?
    Regards,
    Runjhun.

    Thnx a lot Darin.
    Bt may be I should be more clear with my reqmts.
    In the image attached the data to be plotted is stored in Excel from LabVIEW.
    And the graph is plotted in Excel selecting the data.
    Plotting of graph is maual.
    I want that the graph plotting should be automatic.
    In RGT der's a function Excel Plot Graph bt the problem is dat it takes only 2d double array as I mentioned earlier.
    May be dis wil make my problem clearer.
    Regards,
    Runjhun A.
    Attachments:
    plot_type.jpg ‏3724 KB

  • Help convert date please

    I have 3 possible length Dates stored in a VARCHAR2 field type, I am trying to convert that for a friend:
    we are looking for this in the End as either a Date or a Number field or both (that's what is needed)
    20110829 YYYYMMDD
    what I have is these distinct length type on the field:
    8
    07/13/13
    9
    6/30/2012
    10
    10/13/2011
    Can someone help me convert this field to either number: 20120512 or Date YYYYMMDD ? both examples would help too :- ) learning

    You can use the below to find the problem date(s) in your table. The SELECT obviously needs to be updated with your table/column names
    CREATE OR REPLACE FUNCTION dateconvert(p_chardate  VARCHAR2)
    RETURN VARCHAR2
    AS
      v_date  DATE;
    BEGIN
      v_date := TO_DATE(p_chardate, 'MM/DD/RR');
      RETURN 'OK';
    EXCEPTION
      WHEN OTHERS THEN
        RETURN   p_chardate;
    END;
    SELECT datecol
    FROM   datetable
    WHERE dateconvert(datecol) != 'OK';

  • CONVERTING DATA TO 2 DECIMAL PLACES

    All,
    I needed to convert a BSO database to only have 2 decimal places. I did this by exporting the data and restricting the export calc to 2 decimal places.
    HOWEVER - there still appears to be rollups that have more than 2 decimal places.
    * Is there an easier way to convert data to 2 decimal places?
    * Is there a "bug" were essbase produces more than 2 decimal places even when all 0 level members have none?
    Thanks

    Old posts never die until they're beaten into the ground...
    On the off chance that someone, anyone still cares, Glenn was absolutely correct when he stated that Essbase stores data as floating point values.
    And when that happens, only values that are divisible by two or 10 are stored without some kind of fractional value.
    See the DBAG: http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_dbag/dcaintro.html
    Most computers represent numbers in binary, and therefore can only approximately represent real numbers. Because binary computers cannot hold an infinite number of bits after a decimal point, numeric fractions such as one-third (0.3333...) cannot be expressed as a decimal with a terminating point. Fractions with a denominator of the power of two (for example, 0.50) or ten (0.10) are the only real numbers that can be represented exactly. See IEEE Standard 754 for Floating-Point Representation (IEEE, 1985).There is nothing you can do other than handle the round/truncate in the reporting layer.
    You can always take it up with IEEE. :) As we used to say in school when taunting Electrical Engineers, "You can't spell 'geek' without --Cameron-- 'ee'." :) Or hope for an analog computer.
    Regards,
    Cameron Lackpour

  • Convert Date using ORACLE WAREHOUSE BUILDER

    Hi,
    I need to convert date format from 'DD/MON/YYYY' to 'YYYY/MON/DD'. The data is varchar(2) and in the database is stored as date. I am using expression component.
    I used this expressionS REPLACE(TO_CHAR(INGRP1.FROMDATE), 'YYYY-MON-DD') REPLACE(TO_CHAR(INGRP1.TO DATE), 'YYYY-MON-DD') and it gave me an error: literal does not match format string.
    Can anyone help me! PLEASE. IT'S URGENT

    You are in the wrong forum. This is the forum for the SQL Developer tool. You wll get better answer from Warehouse Builder forums or from then SQL and PL/SQL forum.
    To convert varchar to date use the to_date function, In your case something like
    to_date(date_field,'DD/Mon/YYYY');

Maybe you are looking for

  • Error while calling application?

    Hi all, I m getting a error while i m testing my application... Error:WebDynpro Exception: ICF service node for application /sap/public/myssocntl does not exist Note The following error text was processed in the system CGQ : WebDynpro Exception: ICF

  • Constant HDD access (K8N Neo4 Platinum)

    Hello all, this is my first time posting on these forums. A couple of days ago I put together a new system for myself, with the following components: * Athlon64 3200+ processor * MSI K8N Neo4 Platinum motherboard * 1Gb RAM * Gigabyte 128Mb GeForce 66

  • Outgoing mail times out.

    For the past week, I have been unable to send emails through the Mail client. I am receiving mail just fine, but whenever I try to send something, this message appears: This message could not be delivered and will remain in your Outbox until it can b

  • Low quality titles.

    When i import a tile to a clip the quality of the title becomes really really blurry. What went wrong and how do i fix it?

  • LMS 4.2.2 - Compliance Policy and PSIRT/EOX Job Report

    I noticed that the job titled Compliance Policy and PSIRT/EOX Job Report has been running since oct 4, 2012 @ 00:30:00.  I can see that previous jobs usually take about 3 minutes to complete.  Is there a way to stop the job?  Is it safe to stop the j