INSERT GetDate() into open table

  • 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

     

  • 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


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • 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

  • 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,

    I knew I had this somewhere in my notes, and I found it this a.m.  Current Date should be CTRL-SemiColon; Current Time is CTRL-Shift-SemiColon (a.k.a. CTRL-Colon).  At least, these work for me!

    HTH - Linda

  • Fantastic, I figured there'd be a way to do this. Thanks Linda.

     

  • 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]

  • 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]

  • Wayne!  Were you changing data in EM??? 

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply