Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

current date month year in flex

New Here ,
Aug 18, 2009 Aug 18, 2009

can anyone let me know how to get current system date in flex

and how to compare seleted date and system date in flex

thanks in advance

13.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 18, 2009 Aug 18, 2009

below is the example code which get the date, month and year

when you try to access the month it return less than one (if you try to get the month when the month is set to jan it return zero ) while displaying we need to increment as months starts from one

import mx.controls.Alert;

public function init():void

{

var dt:Date= new Date();

Alert.show("date : "+dt.getDate().toString()+"\nmonth : "+Number(Number(dt.getMonth().toString())+1) +"\nYear : "+dt.getFullYear().toString());

}

if this post answers your question or helps, please mark it as such

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 18, 2009 Aug 18, 2009

hi thats fine to get the current date but am using comboBox for date month and year when i select the current date

it has to show the alert msg can u let me know how can i compare selected date month year and current date month year

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 18, 2009 Aug 18, 2009

Use a labelFunction with the ComboBox, and in the function do the compare.

If this post answers your question or helps, please mark it as such.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 19, 2009 Aug 19, 2009
LATEST

thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines