Copy link to clipboard
Copied
this is not working
var currDate:Date = new Date(); | |
txtTest.text = currDate; box is empty |
also when I find something that works, to parse out yyyy mm and dd
I have seen these examples, not sure at this point which one would work or both?
var currentDate=new Date();
var month=currentDate.getMonth();
var day=currentDate.getDate();
var year=currentDate.getFullYear();
or
var mm = currentDate.month
var yyyy = currentDate.fullyear
var dd = currentDate.day
I need to assemble the date like this: yyyymmdd, using it for date compares
If the first code you showed is not displaying the date, then your problem is likely with what you have done for the textfield... the code works when the textfield is properly configured.
Make sure you are assigning the instance name to the Textfield where it says Instance Name in the properties panel. Make sure the color of the text in the textfield is not the same as the background color.
Copy link to clipboard
Copied
If the first code you showed is not displaying the date, then your problem is likely with what you have done for the textfield... the code works when the textfield is properly configured.
Make sure you are assigning the instance name to the Textfield where it says Instance Name in the properties panel. Make sure the color of the text in the textfield is not the same as the background color.
Copy link to clipboard
Copied
so I assume from your reply the code is correct.
I have used that textbox many times to display values for code I am testing.
Copy link to clipboard
Copied
The first code you showed is correct for a textfield named txtTest. I don't see anything trying to utilize the rest of the code so I haven't answered for whatever you've done with that.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now