I was hoping someone could help me with creating some javascript. I have no knowledge of it whatsoever but it appears to be the only solution to my problem without using a pop up calendar (which seems to take forever on my pc to come up).
I want a timestamp to be put against all my submissions, but I only want DD/MM/YY recorded, and not DD/MM/YY HH:MM as is currently the set up in caspio. I wish to sort my results by day, but at the minute if I do a sort based on the current timestamp they will sort by day by hour by minute. I want my results to show the best price per day (eg Monday) as opposed to by minute the data was entered.
I have tried to amend the sample javascript given in the tutorial but I am not having much success. Can anyone give me a helping hand?
This was my last attempt (please don't laugh):- (my timestamp field is called "date", and it is an update datapage)
//(1) Declaration and initialization
Stamp = new Date();
var v_TimeStamp;
//(2) Construct the value of the v_TimeStamp variable in the format mm/dd/yyyy
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
GLENNSTER
Hi
I was hoping someone could help me with creating some javascript. I have no knowledge of it whatsoever but it appears to be the only solution to my problem without using a pop up calendar (which seems to take forever on my pc to come up).
I want a timestamp to be put against all my submissions, but I only want DD/MM/YY recorded, and not DD/MM/YY HH:MM as is currently the set up in caspio. I wish to sort my results by day, but at the minute if I do a sort based on the current timestamp they will sort by day by hour by minute. I want my results to show the best price per day (eg Monday) as opposed to by minute the data was entered.
I have tried to amend the sample javascript given in the tutorial but I am not having much success. Can anyone give me a helping hand?
This was my last attempt (please don't laugh):- (my timestamp field is called "date", and it is an update datapage)
//(1) Declaration and initialization
Stamp = new Date();
var v_TimeStamp;
//(2) Construct the value of the v_TimeStamp variable in the format mm/dd/yyyy
v_TimeStamp=('' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getFullYear();
//(3) Field name - Date is referred with a prefix - EditRecord
document.forms[0].UpdateDate.value=v_TimeStamp;
Any help is greatly appreciated.
Thanks
Glenn
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.