April 12, 2005 at 3:12 am
Hiya,
I have a table open in EM. Is there a way to enter a current timestamp into a datetime/smalldatetime field?
Very much like CTRL-0 inserts NULL.
TIA
Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
April 12, 2005 at 5:29 am
No, there is not. You can, however, paste a date from Query Analyzer... or you could set the table up to fill the column with GETDATE() as a default for new records.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 12, 2005 at 6:27 am
Another option well worth considering, is to not enter, change or delete data in EM at all.
Make a habit to do this kind of operations in QA instead. Better control, and less problems
/Kenneth
April 12, 2005 at 6:32 am
Kenneth,
I always do - hence this is an exception proving my rule.
On this odd occasion it made sense to do it in EM and I had a lightbulb go off saying "Wouldn't it be good if I could easily stick in GETDATE()".
Thanks for the replies!
Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
April 13, 2005 at 9:24 am
April 13, 2005 at 9:29 am
Fantastic, I figured there'd be a way to do this. Thanks Linda.
Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
April 13, 2005 at 10:42 am
Interesting. So they partially implemented something that they've been doing in Access for years. You can also use Ctrl-Quote (single or double) to copy the same field value of the previous record in Access.
Good to know, but I agree: EM is not the place to be changing data. 🙂
-----
[font="Arial"]Knowledge is of two kinds. We know a subject ourselves or we know where we can find information upon it. --Samuel Johnson[/font]
April 13, 2005 at 10:45 am
I just noticed that it looks like you can use the shortcut to insert date or time, but not both. It seems that it clears the field contents before inserting whatever.
-----
[font="Arial"]Knowledge is of two kinds. We know a subject ourselves or we know where we can find information upon it. --Samuel Johnson[/font]
April 13, 2005 at 10:46 am
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply