Edwin,

     Why do you do something this:
     <mx:Script>
            <![CDATA[
                     import mx.controls.DateField;
                     import mx.containers.VBox;
                     import mx.containers.Box;

                     var v1:VBox = new VBox();
                     var headerBox:Box = new Box();
                     var middleBox:Box = new Box();
                     var footerBox:Box = new Box();

                     middleBox.height="95%";
                     headerBox.addChild(DateField.dateToString(new
Date(),'YYYY-MM-DD'));
                     addChild(v1);

             ]]>
         </mx:Script>

-Tino

PS: This is from memory.
On Fri, Jun 12, 2009 at 1:37 PM, <edwin.vgw...@gmail.com> wrote:

> Thank you for the source code.
> What if I just want to have the current date on the top of the page?
>
>
>
> 2009/6/12 Endel Guimarães Silva <endel...@gmail.com>
>
>> <?xml version="1.0" encoding="utf-8"?>
>> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml";
>> layout="absolute">
>>  <mx:Script>
>> <![CDATA[
>> import mx.controls.DateField;
>>  import mx.controls.Alert;
>> private function clickEvent():void
>> {
>>  Alert.show('Selected date: '+ DateField.dateToString(new
>> Date(),'YYYY-MM-DD'));
>> }
>>
> ]]>

> </mx:Script>
>> <mx:Button x="9.95" y="198" label="Click me" click="clickEvent()"/>
>> </mx:WindowedApplication>
>>
>>
>> On Fri, Jun 12, 2009 at 12:02 PM, <edwin.vgw...@gmail.com> wrote:
>>
>>> Can you put this in a Flex App and send me the code?
>>>
>>> 2009/6/12 Endel Guimarães Silva <endel...@gmail.com>
>>>
>>>> If you want to generate a timestamp as a string, you can do this:
>>>> var date:Date = new Date(); // just as Dolly said above, this creates
>>>> an object with the current date
>>>> var strDate:String = DateField.dateToString(date,'YYYY-MM-DD'); // and
>>>> this turns that date into a string, just as '2009-12-03'
>>>>
>>>> check out this dateToString function to see how can you handle the date
>>>> =)
>>>>
>>>>
>>>>
>>>> On Mon, Jun 8, 2009 at 2:22 PM, <edwin.vgw...@gmail.com> wrote:
>>>>
>>>>> Hi Dolly, Thanks for your response.
>>>>> Can you send me a sample code?
>>>>> I'm not sure how to implement.
>>>>> Sorry for the bother.
>>>>> Thanks
>>>>> Edsaid
>>>>>
>>>>> On Mon, Jun 8, 2009 at 5:54 AM, dolly <dolly.sa...@gmail.com> wrote:
>>>>>
>>>>>>
>>>>>> Use var date:Date = new Date();
>>>>>> It creates a Date with current Timestamp, you can use DateFormatter
>>>>>> class to present this timestamp in any format.
>>>>>>
>>>>>> If you want to continuously update current time, use a Timer.
>>>>>> Hope it helps
>>>>>> ~Dolly
>>>>>>
>>>>>>
>>>>>> On Jun 7, 10:56 pm, edwin.vgw...@gmail.com wrote:
>>>>>> > How can I add Timestamp to my app???
>>>>>> >
>>>>>> > Thank you
>>>>>> > Edsaid
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sincerely
>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>> Edwin Melendez
>>>>> Print/Web/Media
>>>>> 646-246-4368
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Endel Guimarães Silva
>>>> Eccen - Excelência em Tecnologia
>>>>
>>>> Fone +55 19 3231-2988 - Fax + 55 19 3231-2914
>>>> endel.guimar...@eccen.com.br
>>>> www.eccen.com.br
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Sincerely
>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>> Edwin Melendez
>>> Print/Web/Media
>>> 646-246-4368
>>>
>>>
>>>
>>
>>
>> --
>> Endel Guimarães Silva
>> Eccen - Excelência em Tecnologia
>>
>> Fone +55 19 3231-2988 - Fax + 55 19 3231-2914
>> endel.guimar...@eccen.com.br
>> www.eccen.com.br
>>
>>
>>
>
>
> --
> Sincerely
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> Edwin Melendez
> Print/Web/Media
> 646-246-4368
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to