Put the long date into field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Put the long date into field
"put the long date into field----" only puts date in every 2nd or 3rd field. It was putting the change in every other field, then every third field, but never every field. How does one get this to work on all fields? Boxes are unchecked for having this happen.
-
- VIP Livecode Opensource Backer
- Posts: 9841
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Put the long date into field
I'm guessing there's more to that code than "put the long date into field----". If you post the complete relevant portion we'll be able to determine what went wrong.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Put the long date into field
The rest of the code doesn't pertain to that.
Check this out:
set the text of field "Begins" of me to pDataArray["label 3"]
put the long date into field "Begins"
Check this out:
set the text of field "Begins" of me to pDataArray["label 3"]
put the long date into field "Begins"
Re: Put the long date into field
You are quite miserly with your infos!?
So it appears like you are talking about filling a DATAGRID, right?
Try this:
...
set the text of field "Begins" of me to pDataArray["label 3"]
put the long date into field "Begins" OF ME
...
So it appears like you are talking about filling a DATAGRID, right?
Try this:
...
set the text of field "Begins" of me to pDataArray["label 3"]
put the long date into field "Begins" OF ME
...
Re: Put the long date into field
EXCELLENT! Works.
Thank you.
Not being miserly. This was all the relative code. Trying to keep it simple.
Help appreciated.
Thank you.
Not being miserly. This was all the relative code. Trying to keep it simple.
Help appreciated.
Re: Put the long date into field
That put today's date in every field. Solved part of the issue.
I am trying to change the date format in the field from year, day, the date format for MySQL, to the long date.
I didn't make that clear. Terminology.
I am trying to change the date format in the field from year, day, the date format for MySQL, to the long date.
I didn't make that clear. Terminology.
Re: Put the long date into field
You did not mention this at all!bbhank wrote:That put today's date in every field. Solved part of the issue.
I am trying to change the date format in the field from year, day, the date format for MySQL, to the long date.
I didn't make that clear. Terminology.
So what exactly do you want to do now?
Re: Put the long date into field
At this point to convert that date to the long date is needed. Your solution on putting "of me" did the trick, now I just need the date "humanized" to the long date. It's in yyyy-dd-mm.
Re: Put the long date into field
AHA!
OK, do like this:
...
## Presuming pDataArray["label 3"] will hold the date?
put pDataArray["label 3"] into tDate
set itemdel to "-"
## Re-arrange to normal english (non SQL) date order:
put item 3 of tDate & "/" & item 2 of tDate & "/" & item 1 of tDate into tNewDate
## Now use LCs convert command:
convert tNewDate to long date
## Now you can display the converted date:
put tNewDate into field "Begins" OF ME
...
Best
Klaus
OK, do like this:
...
## Presuming pDataArray["label 3"] will hold the date?
put pDataArray["label 3"] into tDate
set itemdel to "-"
## Re-arrange to normal english (non SQL) date order:
put item 3 of tDate & "/" & item 2 of tDate & "/" & item 1 of tDate into tNewDate
## Now use LCs convert command:
convert tNewDate to long date
## Now you can display the converted date:
put tNewDate into field "Begins" OF ME
...
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Put the long date into field
@bbhank, I think a lot of things will be much clearer if you can get an overview of how LC works and its basic functionalities. If you read through at least the first few stacks in the Scripting Conference series it could help those ephiphanies happen a lot quicker:
http://www.hyperactivesw.com/revscriptc ... ences.html
These stacks assume no prior knowlege of LC and walk you through all the basic concepts. They have script examples with explanations. There is a Q&A session transcript at the end of each stack. The conferences took place many years ago and the stacks are a bit dated (you may still find some references to LC's previous name "RunRev") but the information is still valid. Knowing the overall picture helps a lot.
http://www.hyperactivesw.com/revscriptc ... ences.html
These stacks assume no prior knowlege of LC and walk you through all the basic concepts. They have script examples with explanations. There is a Q&A session transcript at the end of each stack. The conferences took place many years ago and the stacks are a bit dated (you may still find some references to LC's previous name "RunRev") but the information is still valid. Knowing the overall picture helps a lot.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Put the long date into field
That works fine.
Thank you.
Thank you.