RE: Inserting date/time stamp
Do you want to know the time when the form was 'opened' (viewed you mean) or actually saved? For example, I may hit your form at 12:01 PM, and it may take me 5 minutes to fill it out. So would you want 12:01 PM stored, or 12:06 PM, the time when the form was actually submitted? If you want the first time, simply eded this in the form: input type=hidden name=theTime value=#now()# and store form.theTime in your db. If you want the time submitted, just passed now() to your database (or whatever function your db uses to represent the current time). === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:14 PM To: CF-Talk Subject: Inserting date/time stamp Hi, I have a form that I want to insert the date and time when the form is opened. This will also be saved to a database when saved. Whats the best way of also creating a automatic reference no which increments when a new form is opened? Any ideas... --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
You could always use an application variable. I'm not sure what that has to do with a date/time object. Just out of curiosity, if this is going to a database, can't you just create a unique self-incrementing field and use that? -- Ben Doom Programmer General Lackey Moonbow Software, Inc : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 2:14 PM : To: CF-Talk : Subject: Inserting date/time stamp : : : Hi, : : I have a form that I want to insert the date and time when the : form is opened. This will also be saved to a database when saved. : : Whats the best way of also creating a automatic reference no : which increments when a new form is opened? : : Any ideas... : : : --- : Colonel Nathan R. Jessop : Commanding Officer : Marine Ground Forces : Guatanamo Bay, Cuba : --- : : : : ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: Do you want to know the time when the form was 'opened' (viewed you mean) or actually saved? I want the date and time the form was opened/created. For example, I may hit your form at 12:01 PM, and it may take me 5 minutes to fill it out. So would you want 12:01 PM stored, or 12:06 PM, the time when the form was actually submitted? If you want the first time, simply eded this in the form: input type=hidden name=theTime value=#now()# and store form.theTime in your db. If you want the time submitted, just passed now() to your database (or whatever function your db uses to represent the current time). Thanks === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:14 PM To: CF-Talk Subject: Inserting date/time stamp Hi, I have a form that I want to insert the date and time when the form is opened. This will also be saved to a database when saved. Whats the best way of also creating a automatic reference no which increments when a new form is opened? Any ideas... --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting date/time stamp
Why not just have a date/time field in your DB that gets autofilled with the server time when you add the form data record when the user submits the form? At 02:13 PM 3/10/2003 -0500, you wrote: Hi, I have a form that I want to insert the date and time when the form is opened. This will also be saved to a database when saved. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
HmmmI also want the date and time displayed on my form. I did a cfoutput#now()#/cfoutput but I don't like the results. I want something like: Monday, March 10, 2003 at 2:26pm On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: Do you want to know the time when the form was 'opened' (viewed you mean) or actually saved? For example, I may hit your form at 12:01 PM, and it may take me 5 minutes to fill it out. So would you want 12:01 PM stored, or 12:06 PM, the time when the form was actually submitted? If you want the first time, simply eded this in the form: input type=hidden name=theTime value=#now()# and store form.theTime in your db. If you want the time submitted, just passed now() to your database (or whatever function your db uses to represent the current time). === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:14 PM To: CF-Talk Subject: Inserting date/time stamp Hi, I have a form that I want to insert the date and time when the form is opened. This will also be saved to a database when saved. Whats the best way of also creating a automatic reference no which increments when a new form is opened? Any ideas... --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
On Mon, 10 Mar 2003 14:23:36 -0500, Ben Doom wrote: You could always use an application variable. I'm not sure what that has to do with a date/time object. Just out of curiosity, if this is going to a database, can't you just create a unique self-incrementing field and use that? How? -- Ben Doom Programmer General Lackey Moonbow Software, Inc : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 2:14 PM : To: CF-Talk : Subject: Inserting date/time stamp : : : Hi, : : I have a form that I want to insert the date and time when the : form is opened. This will also be saved to a database when saved. : : Whats the best way of also creating a automatic reference no : which increments when a new form is opened? : : Any ideas... : : : --- : Colonel Nathan R. Jessop : Commanding Officer : Marine Ground Forces : Guatanamo Bay, Cuba : --- : : : : ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
see inline -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:27 PM To: CF-Talk Subject: RE: Inserting date/time stamp HmmmI also want the date and time displayed on my form. I did a cfoutput#now()#/cfoutput but I don't like the results. Beeter talk to Mr. Wells, he might agree with you! LOL! I want something like: Monday, March 10, 2003 at 2:26pm look at the DateFormat function Doug On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: Do you want to know the time when the form was 'opened' (viewed you mean) or actually saved? For example, I may hit your form at 12:01 PM, and it may take me 5 minutes to fill it out. So would you want 12:01 PM stored, or 12:06 PM, the time when the form was actually submitted? If you want the first time, simply eded this in the form: input type=hidden name=theTime value=#now()# and store form.theTime in your db. If you want the time submitted, just passed now() to your database (or whatever function your db uses to represent the current time). === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:14 PM To: CF-Talk Subject: Inserting date/time stamp Hi, I have a form that I want to insert the date and time when the form is opened. This will also be saved to a database when saved. Whats the best way of also creating a automatic reference no which increments when a new form is opened? Any ideas... --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
Check your DateFormat() and TimeFormat() functions. It's there, check the help files. ~Todd At 02:26 PM 3/10/2003 -0500, you wrote: HmmmI also want the date and time displayed on my form. I did a cfoutput#now()#/cfoutput but I don't like the results. I want something like: Monday, March 10, 2003 at 2:26pm ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
You need to format it. #DayOfWeekAsString(Now())#, #DateFormat(Now(), d, )# at #TimeFormat(Now(),h:mmtt)# -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:27 PM To: CF-Talk Subject: RE: Inserting date/time stamp HmmmI also want the date and time displayed on my form. I did a cfoutput#now()#/cfoutput but I don't like the results. I want something like: Monday, March 10, 2003 at 2:26pm On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: Do you want to know the time when the form was 'opened' (viewed you mean) or actually saved? For example, I may hit your form at 12:01 PM, and it may take me 5 minutes to fill it out. So would you want 12:01 PM stored, or 12:06 PM, the time when the form was actually submitted? If you want the first time, simply eded this in the form: input type=hidden name=theTime value=#now()# and store form.theTime in your db. If you want the time submitted, just passed now() to your database (or whatever function your db uses to represent the current time). == = Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:14 PM To: CF-Talk Subject: Inserting date/time stamp Hi, I have a form that I want to insert the date and time when the form is opened. This will also be saved to a database when saved. Whats the best way of also creating a automatic reference no which increments when a new form is opened? Any ideas... --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
dateformat() and timeformat() should take care of display issues nicely for you. -- Ben Doom Programmer General Lackey Moonbow Software, Inc : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 2:27 PM : To: CF-Talk : Subject: RE: Inserting date/time stamp : : : HmmmI also want the date and time displayed on my form. I did : a cfoutput#now()#/cfoutput but I don't like the results. : : I want something like: : : Monday, March 10, 2003 at 2:26pm : : : : On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: : : Do you want to know the time when the form was 'opened' (viewed you : mean) or actually saved? For example, I may hit your form at 12:01 PM, : and it may take me 5 minutes to fill it out. So would you want 12:01 PM : stored, or 12:06 PM, the time when the form was actually submitted? If : you want the first time, simply eded this in the form: : : input type=hidden name=theTime value=#now()# : : and store form.theTime in your db. If you want the time submitted, just : passed now() to your database (or whatever function your db uses to : represent the current time). : : === : Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc : Member of Team Macromedia : : Email: [EMAIL PROTECTED] : Blog : www.camdenfamily.com/morpheus/blog : Yahoo IM : morpheus : : My ally is the Force, and a powerful ally it is. - Yoda : : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 1:14 PM : To: CF-Talk : Subject: Inserting date/time stamp : : : Hi, : : I have a form that I want to insert the date and time when : the form is opened. This will also be saved to a database when saved. : : Whats the best way of also creating a automatic reference : no which increments when a new form is opened? : : Any ideas... : : : --- : Colonel Nathan R. Jessop : Commanding Officer : Marine Ground Forces : Guatanamo Bay, Cuba : --- : : : : : : ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
Try #dateformat(now(), , dd, )# #timeformat(now(),hh:mm)# I think that's right, masks may be off. John Venable -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:27 PM To: CF-Talk Subject:RE: Inserting date/time stamp HmmmI also want the date and time displayed on my form. I did a cfoutput#now()#/cfoutput but I don't like the results. I want something like: Monday, March 10, 2003 at 2:26pm On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: Do you want to know the time when the form was 'opened' (viewed you mean) or actually saved? For example, I may hit your form at 12:01 PM, and it may take me 5 minutes to fill it out. So would you want 12:01 PM stored, or 12:06 PM, the time when the form was actually submitted? If you want the first time, simply eded this in the form: input type=hidden name=theTime value=#now()# and store form.theTime in your db. If you want the time submitted, just passed now() to your database (or whatever function your db uses to represent the current time). === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:14 PM To: CF-Talk Subject: Inserting date/time stamp Hi, I have a form that I want to insert the date and time when the form is opened. This will also be saved to a database when saved. Whats the best way of also creating a automatic reference no which increments when a new form is opened? Any ideas... --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
In SQL 2000 Server, using the Enterprise Manager, you create a new field (probably an integer), set it to be an identity, tell it where you want to start counting (we find 1 to be convenient) and what you want to increment by (again, 1 is convenient :-) Each time a record is inserted, it will get a brand spanking new number that is guaranteed to be unique. -- Ben Doom Programmer General Lackey Moonbow Software, Inc : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 2:28 PM : To: CF-Talk : Subject: RE: Inserting date/time stamp : : : On Mon, 10 Mar 2003 14:23:36 -0500, Ben Doom wrote: : : You could always use an application variable. I'm not sure : what that has to : do with a date/time object. : : Just out of curiosity, if this is going to a database, can't : you just create : a unique self-incrementing field and use that? : : How? : : : -- Ben Doom : Programmer General Lackey : Moonbow Software, Inc : : : -Original Message- : : From: FlashGuy [mailto:[EMAIL PROTECTED] : : Sent: Monday, March 10, 2003 2:14 PM : : To: CF-Talk : : Subject: Inserting date/time stamp : : : : : : Hi, : : : : I have a form that I want to insert the date and time when the : : form is opened. This will also be saved to a database when saved. : : : : Whats the best way of also creating a automatic reference no : : which increments when a new form is opened? : : : : Any ideas... : : : : : : --- : : Colonel Nathan R. Jessop : : Commanding Officer : : Marine Ground Forces : : Guatanamo Bay, Cuba : : --- : : : : : : : : : : ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting date/time stamp
You should probably think of the hidden date/time field and the displayed date/time as two separate things. For the second, you always need to format a date and time before outputting it to screen, e.g.: #dateformat(now(), , d, )# at #timeformat(now()) Matthew Walker Electric Sheep Web http://www.electricsheep.co.nz/ - Original Message - From: FlashGuy [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 8:26 AM Subject: RE: Inserting date/time stamp HmmmI also want the date and time displayed on my form. I did a cfoutput#now()#/cfoutput but I don't like the results. I want something like: Monday, March 10, 2003 at 2:26pm On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: Do you want to know the time when the form was 'opened' (viewed you mean) or actually saved? For example, I may hit your form at 12:01 PM, and it may take me 5 minutes to fill it out. So would you want 12:01 PM stored, or 12:06 PM, the time when the form was actually submitted? If you want the first time, simply eded this in the form: input type=hidden name=theTime value=#now()# and store form.theTime in your db. If you want the time submitted, just passed now() to your database (or whatever function your db uses to represent the current time). === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:14 PM To: CF-Talk Subject: Inserting date/time stamp Hi, I have a form that I want to insert the date and time when the form is opened. This will also be saved to a database when saved. Whats the best way of also creating a automatic reference no which increments when a new form is opened? Any ideas... --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
Read the docs on timeFormat() :) === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:27 PM To: CF-Talk Subject: RE: Inserting date/time stamp HmmmI also want the date and time displayed on my form. I did a cfoutput#now()#/cfoutput but I don't like the results. I want something like: Monday, March 10, 2003 at 2:26pm On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: Do you want to know the time when the form was 'opened' (viewed you mean) or actually saved? For example, I may hit your form at 12:01 PM, and it may take me 5 minutes to fill it out. So would you want 12:01 PM stored, or 12:06 PM, the time when the form was actually submitted? If you want the first time, simply eded this in the form: input type=hidden name=theTime value=#now()# and store form.theTime in your db. If you want the time submitted, just passed now() to your database (or whatever function your db uses to represent the current time). == = Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:14 PM To: CF-Talk Subject: Inserting date/time stamp Hi, I have a form that I want to insert the date and time when the form is opened. This will also be saved to a database when saved. Whats the best way of also creating a automatic reference no which increments when a new form is opened? Any ideas... --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
-- Original Message -- From: FlashGuy [EMAIL PROTECTED] HmmmI also want the date and time displayed on my form. I did a cfoutput#now()#/cfoutput but I don't like the results. I want something like: Monday, March 10, 2003 at 2:26pm Try: cfoutput#DateFormat(Now(),, d, )# at #TimeFormat(Now(),h:mm tt)#/cfoutput Scott Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
-- Original Message -- From: Everett, Al [EMAIL PROTECTED] You need to format it. #DayOfWeekAsString(Now())#, #DateFormat(Now(), d, )# at #TimeFormat(Now(),h:mmtt)# Actually, you can combine those first two functions into one: #DateFormat(Now(),, d, )# (that gives you the Day of the Week as a string along with the rest of the date formatting) Scott Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
Works great. How can I stop people of editing the input line where I'm dumping the date? I don't want them to be able to change it. input type=text name=theTime value=cfoutputnbsp;#DateFormat(todayDate, , dd, )#/cfoutput size=30 On Mon, 10 Mar 2003 14:35:13 -0500, Ben Doom wrote: dateformat() and timeformat() should take care of display issues nicely for you. -- Ben Doom Programmer General Lackey Moonbow Software, Inc : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 2:27 PM : To: CF-Talk : Subject: RE: Inserting date/time stamp : : : HmmmI also want the date and time displayed on my form. I did : a cfoutput#now()#/cfoutput but I don't like the results. : : I want something like: : : Monday, March 10, 2003 at 2:26pm : : : : On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: : : Do you want to know the time when the form was 'opened' (viewed you : mean) or actually saved? For example, I may hit your form at 12:01 PM, : and it may take me 5 minutes to fill it out. So would you want 12:01 PM : stored, or 12:06 PM, the time when the form was actually submitted? If : you want the first time, simply eded this in the form: : : input type=hidden name=theTime value=#now()# : : and store form.theTime in your db. If you want the time submitted, just : passed now() to your database (or whatever function your db uses to : represent the current time). : : === : Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc : Member of Team Macromedia : : Email: [EMAIL PROTECTED] : Blog : www.camdenfamily.com/morpheus/blog : Yahoo IM : morpheus : : My ally is the Force, and a powerful ally it is. - Yoda : : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 1:14 PM : To: CF-Talk : Subject: Inserting date/time stamp : : : Hi, : : I have a form that I want to insert the date and time when : the form is opened. This will also be saved to a database when saved. : : Whats the best way of also creating a automatic reference : no which increments when a new form is opened? : : Any ideas... : : : --- : Colonel Nathan R. Jessop : Commanding Officer : Marine Ground Forces : Guatanamo Bay, Cuba : --- : : : : : : ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
You can used the disabled attribute if all your users are using IE. (Not recommended.) I would display the text outside of the form and put the value in a hidden field. #DateFormat(todayDate, , dd, )# input type=hidden name=theTime value=cfoutputnbsp;#DateFormat(todayDate, , dd, )#/cfoutput -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 3:09 PM To: CF-Talk Subject: RE: Inserting date/time stamp Works great. How can I stop people of editing the input line where I'm dumping the date? I don't want them to be able to change it. input type=text name=theTime value=cfoutputnbsp;#DateFormat(todayDate, , dd, )#/cfoutput size=30 On Mon, 10 Mar 2003 14:35:13 -0500, Ben Doom wrote: dateformat() and timeformat() should take care of display issues nicely for you. -- Ben Doom Programmer General Lackey Moonbow Software, Inc : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 2:27 PM : To: CF-Talk : Subject: RE: Inserting date/time stamp : : : HmmmI also want the date and time displayed on my form. I did : a cfoutput#now()#/cfoutput but I don't like the results. : : I want something like: : : Monday, March 10, 2003 at 2:26pm : : : : On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: : : Do you want to know the time when the form was 'opened' (viewed you : mean) or actually saved? For example, I may hit your form at 12:01 PM, : and it may take me 5 minutes to fill it out. So would you want 12:01 PM : stored, or 12:06 PM, the time when the form was actually submitted? If : you want the first time, simply eded this in the form: : : input type=hidden name=theTime value=#now()# : : and store form.theTime in your db. If you want the time submitted, just : passed now() to your database (or whatever function your db uses to : represent the current time). : : == = : Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc : Member of Team Macromedia : : Email: [EMAIL PROTECTED] : Blog : www.camdenfamily.com/morpheus/blog : Yahoo IM : morpheus : : My ally is the Force, and a powerful ally it is. - Yoda : : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 1:14 PM : To: CF-Talk : Subject: Inserting date/time stamp : : : Hi, : : I have a form that I want to insert the date and time when : the form is opened. This will also be saved to a database when saved. : : Whats the best way of also creating a automatic reference : no which increments when a new form is opened? : : Any ideas... : : : --- : Colonel Nathan R. Jessop : Commanding Officer : Marine Ground Forces : Guatanamo Bay, Cuba : --- : : : : : : ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
IIRC, add the keyword readonly to the tag ie input type=text value=don't change this readonly Maybe someone with a better memory than mine can confirm. :-) -- Ben Doom Programmer General Lackey Moonbow Software, Inc : -Original Message- : From: FlashGuy [mailto:[EMAIL PROTECTED] : Sent: Monday, March 10, 2003 3:09 PM : To: CF-Talk : Subject: RE: Inserting date/time stamp : : : Works great. : : How can I stop people of editing the input line where I'm : dumping the date? I don't want them to be able to change it. : : input type=text name=theTime : value=cfoutputnbsp;#DateFormat(todayDate, , dd, : )#/cfoutput size=30 : : : : On Mon, 10 Mar 2003 14:35:13 -0500, Ben Doom wrote: : : dateformat() and timeformat() should take care of display : issues nicely for : you. : : : -- Ben Doom : Programmer General Lackey : Moonbow Software, Inc : : : -Original Message- : : From: FlashGuy [mailto:[EMAIL PROTECTED] : : Sent: Monday, March 10, 2003 2:27 PM : : To: CF-Talk : : Subject: RE: Inserting date/time stamp : : : : : : HmmmI also want the date and time displayed on my form. I did : : a cfoutput#now()#/cfoutput but I don't like the results. : : : : I want something like: : : : : Monday, March 10, 2003 at 2:26pm : : : : : : : : On Mon, 10 Mar 2003 13:19:13 -0600, Raymond Camden wrote: : : : : Do you want to know the time when the form was 'opened' (viewed you : : mean) or actually saved? For example, I may hit your form : at 12:01 PM, : : and it may take me 5 minutes to fill it out. So would you : want 12:01 PM : : stored, or 12:06 PM, the time when the form was actually : submitted? If : : you want the first time, simply eded this in the form: : : : : input type=hidden name=theTime value=#now()# : : : : and store form.theTime in your db. If you want the time : submitted, just : : passed now() to your database (or whatever function your db uses to : : represent the current time). : : : : : === : : Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc : : Member of Team Macromedia : : : : Email: [EMAIL PROTECTED] : : Blog : www.camdenfamily.com/morpheus/blog : : Yahoo IM : morpheus : : : : My ally is the Force, and a powerful ally it is. - Yoda : : : : -Original Message- : : From: FlashGuy [mailto:[EMAIL PROTECTED] : : Sent: Monday, March 10, 2003 1:14 PM : : To: CF-Talk : : Subject: Inserting date/time stamp : : : : : : Hi, : : : : I have a form that I want to insert the date and time when : : the form is opened. This will also be saved to a database : when saved. : : : : Whats the best way of also creating a automatic reference : : no which increments when a new form is opened? : : : : Any ideas... : : : : : : --- : : Colonel Nathan R. Jessop : : Commanding Officer : : Marine Ground Forces : : Guatanamo Bay, Cuba : : --- : : : : : : : : : : : : : : ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
-- Original Message -- From: FlashGuy [EMAIL PROTECTED] How can I stop people of editing the input line where I'm dumping the date? I don't want them to be able to change it. input type=text name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput size=30 I'd display it as plain text (not in a form field), and do a hidden form field to send the value through the form. cfoutput #DateFormat(todayDate, , dd, )#/cfoutput input type=hidden name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
Right, but the idea I was trying to achieve was to keep the look the same (with the input field) so it matches the rest of the form. From: FlashGuy [EMAIL PROTECTED] How can I stop people of editing the input line where I'm dumping the date? I don't want them to be able to change it. input type=text name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput size=30 I'd display it as plain text (not in a form field), and do a hidden form field to send the value through the form. cfoutput #DateFormat(todayDate, , dd, )#/cfoutput input type=hidden name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
-- Original Message -- From: FlashGuy [EMAIL PROTECTED] Right, but the idea I was trying to achieve was to keep the look the same (with the input field) so it matches the rest of the form. In that case, you can try things like disabling it ( disabled=yes in IE) and doing onfocus=this.blur();. But, there are ways around it. As a fail safe, I'd have it display as a textbox, but I'd also use a hidden form field to pass the real value, so that even if they change it, it won't affect the real value. Scott Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting date/time stamp
I'm not sure if this was resolved, but I read the thread and I have a quick bit to add. Both the disabled and the readonly were mentioned, and these are both supported in all the browsers except N4. The difference is that a disabled form field will not be submitted with the form, and readonly field will be. A disabled field in IE looks grayed out as well, whereas a readonly field looks normal. -- mailto:[EMAIL PROTECTED] Monday, March 10, 2003, 6:46:56 PM, you wrote: F Right, but the idea I was trying to achieve was to keep the look the same (with the input field) so it matches the rest of the form. From: FlashGuy [EMAIL PROTECTED] How can I stop people of editing the input line where I'm dumping the date? I don't want them to be able to change it. input type=text name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput size=30 I'd display it as plain text (not in a form field), and do a hidden form field to send the value through the form. cfoutput #DateFormat(todayDate, , dd, )#/cfoutput input type=hidden name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput Scott Brady http://www.scottbrady.net/ F ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
I'd strongly recommend then using the readonly flag, but don't give the field a name. Use a hidden field to contain the date as well as the visible readonly field. It can't hurt, right? -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED] Sent: Tuesday, 11 March 2003 11:47 a.m. To: CF-Talk Subject: RE: Inserting date/time stamp Right, but the idea I was trying to achieve was to keep the look the same (with the input field) so it matches the rest of the form. From: FlashGuy [EMAIL PROTECTED] How can I stop people of editing the input line where I'm dumping the date? I don't want them to be able to change it. input type=text name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput size=30 I'd display it as plain text (not in a form field), and do a hidden form field to send the value through the form. cfoutput #DateFormat(todayDate, , dd, )#/cfoutput input type=hidden name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting date/time stamp
just make a function that reset the form (to its default values) when the submit button is clicked.. input type=button name=submit value=submit onClick=runTheFunction() function runThefunction(){ document.formname.reset(); document.formname.submit(); } - Original Message - From: FlashGuy [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, March 10, 2003 6:46 PM Subject: RE: Inserting date/time stamp Right, but the idea I was trying to achieve was to keep the look the same (with the input field) so it matches the rest of the form. From: FlashGuy [EMAIL PROTECTED] How can I stop people of editing the input line where I'm dumping the date? I don't want them to be able to change it. input type=text name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput size=30 I'd display it as plain text (not in a form field), and do a hidden form field to send the value through the form. cfoutput #DateFormat(todayDate, , dd, )#/cfoutput input type=hidden name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Inserting date/time stamp
cfoutput input type=text name=theTime value=#DateFormat(todayDate, , dd, )# size=30 onBlur=this.value='#DateFormat(todayDate, , dd, )#'; /cfoutput or input type=text name=theTime value=#DateFormat(todayDate, , dd, )# size=30 READONLY thats two methods that i use. tony -Original Message- From: Michael T. Tangorre [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 8:44 PM To: CF-Talk Subject: Re: Inserting date/time stamp just make a function that reset the form (to its default values) when the submit button is clicked.. input type=button name=submit value=submit onClick=runTheFunction() function runThefunction(){ document.formname.reset(); document.formname.submit(); } - Original Message - From: FlashGuy [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, March 10, 2003 6:46 PM Subject: RE: Inserting date/time stamp Right, but the idea I was trying to achieve was to keep the look the same (with the input field) so it matches the rest of the form. From: FlashGuy [EMAIL PROTECTED] How can I stop people of editing the input line where I'm dumping the date? I don't want them to be able to change it. input type=text name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput size=30 I'd display it as plain text (not in a form field), and do a hidden form field to send the value through the form. cfoutput #DateFormat(todayDate, , dd, )#/cfoutput input type=hidden name=theTime value=cfoutput #DateFormat(todayDate, , dd, )#/cfoutput Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4