Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6985625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:42:15+00:00 2026-05-27T18:42:15+00:00

I am using FLEX 3.0 I want to convert string to Date. At first

  • 0

I am using FLEX 3.0 I want to convert string to Date. At first i just think its very easy for me but later its going to be very hard its a simple one but i can’t convert that i have got an error. So please help me.

Hours in 24 hour format. if 7 hour than it shows 07. this one is same for minutes, seconds, date & month.

Here i am providing you the code that i have did till that time…

public function btn_click():void
{
    var str:String = lblDate.text;
    var d:Date = DateField.stringToDate(str,"YYY-MM-DD HH:NN:SS");
    Alert.show(d.toString());
}

<mx:HBox height="5%" width="100%">
    <mx:Label id="lblDate" text="2011-12-07 11:06:01" />
    <mx:Button label="Click" click="{btn_click();}" />
</mx:HBox>

Please Help me as early as possible

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:42:16+00:00Added an answer on May 27, 2026 at 6:42 pm

    According to the documentation, the stringToDate method can only parse patterns containing Y, M, D and delimiter and punctuation characters. So by using H,M and S, you specify invalid characters in the pattern, which in turn determine the method to return null, that’s why you get the error.

    A more appropriate approach would be to use the DateFormatter class, as illustrated in this post here.

    Hope this was useful. Have a good day.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Flex builder with sdk 3.5. I want to convert binary string
My first steps with Flex (currently using Flex 3) and I want to define
I want something like Axiis , but without using Flex or other Adobe products.
I'm building my own language using Flex, but I want to know some things:
How to convert UTC time into date time format in flex. I am using
I'm using Flex 4 and Flash Builder 4. I just want to learn to
I am using flex 4 and I want to custom the preloader, but I
I want to write some text directly to a file using Flex 3 /
How can I create a .txt file using flex 3? And I want to
I want to play Audio in flex application.I am using SWFLoader for it.Is there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.