What is the best way to captue current date and time?

I got a field in table to capute current date and time...i am
using SQL Server.
field name datatype length
enter_datetime datetime 8
What is the best way to get current date and time and insert
to table?.
Is this way?.
<cfset curtime = 'dateformat(#now()#,'mm/dd/yyyy')&"
"&timeformat(#now()#,'hh:mm:ss')'>
This way looks like time is not entered correctly.
or any other better way?.

> get current date and time and insert to table?
You can use cfqueryparam
<cfqueryparam value="#now()#"
cfsqltype="cf_sql_timestamp">
Or as was suggested, set the default for your table column to
getdate(). Then you won't have to insert anything. Sql server will
do it automatically when a new record is created.

Similar Messages

  • What is the best way to move all data and apps from an old ipad to a newq ipad air?

    What is the best way to convert (update) from an original ipad to a new ipad air?

    How to Transfer Everything from an Old iPad to New iPad
    http://osxdaily.com/2012/03/16/transfer-old-ipad-to-new-ipad/
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    http://support.apple.com/kb/HT2109
    Moving Content to a New iPad
    http://tinyurl.com/qzk2a26
    Transferring your prepaid cellular data account depends on your carrier. AT&T lets you move it yourself when you go to Cellular Data in Settings and log into your account with your previous AT&T user name and password. For iPads with Sprint service, you can set up an account on the new iPad and contact Sprint Customer Care (888-211-4727 and go through the menus) to deactivate the old plan and get credit for unused service. For Verizon, call the company’s customer service number for mobile broadband support (800-786-8419) and ask to have your account transferred.
     Cheers, Tom

  • What is the best way to edit meta data..

    What is the best way to edit meta data and tag photos, faces, places etc. and have the data saved to the original photo.
    On a PC I would just use Windows Gallery. iPhoto on the Mac allows for some tagging, but it doesn't save to the original file.
    I like to have my photos in a folder, edit them and save the changes.
    What software would work best on a MAC to accomplish this?
    Thanks for any help,
    Nick

    iPhoto is a database and any metadata you add or edit is available in any app - if you learn how to use it.
    iPhoto is a non-destructive processor. It never touches the original file - it treats it like a film shooter treats the negative.
    If you want a copy of the original file with the metadata included simply export a copy.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    As an FYI:
    For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491

  • We have always used one iTunes account and I want to crate a new account for my daughter.  What is the best way to go about this and will she need to download free apps again?

    We have always used one iTunes account and I want to crate a new account for my daughter.  What is the best way to go about this and will she need to download free apps again?

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • What is the best way to transfer my music and pictures from my old PC to my new Macbook Pro?

    What is the best way to transfer my music and pictures from my old PC to my new Macbook Pro?

    This may help;
    http://www.apple.com/support/macbasics/migration/
    Ciao.

  • What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed?

    What is the best way to safeguard my files and pictures before I send off my MacBook Pro to get fixed? I am running Mavericks and use an AirPort Time Machine to back-up all my files.

    Back up all data on the internal drive(s) before you hand over your computer to anyone. You need at least two independent backups to be completely safe. There are ways to back up a computer that isn't fully functional—ask if you need guidance.
    If privacy is a concern, erase the data partition(s) with the option to write zeros* (do this only if you know how to restore to an empty drive.) Don’t erase the recovery partition, if present.
    Keeping your confidential data secure during hardware repair
    Apple also recommends that you deauthorize a device in the iTunes Store before having it serviced.
    *An SSD doesn't need to be zeroed.

  • What is the best way of deploying a jsp and bc4j aplication

    Hi
    I would like to know what is the best way of deploying a jsp and
    bc4j aplication in ias 9i.
    thanks in advanced
    rjc

    In the page I simply referenced the facescontext directly... no need for a custom servlet.
    public void createcookie() {
    FacesContext fc = FacesContext.getCurrentInstance();
    HttpServletResponse resp = (HttpServletResponse)fc.getExternalContext().getResponse();
    Cookie userCookie = new Cookie("cookiename", "cookievalue");
    userCookie.setMaxAge(-1);
    userCookie.setMaxAge(3600);
    resp.addCookie(userCookie);
    return null;
    public String readcookie() {
    FacesContext fc = FacesContext.getCurrentInstance();
    ExternalContext ec = fc.getExternalContext();
    Map cookiemap = ec.getRequestCookieMap();
    if (cookiemap != null) {
    Cookie cookie = (Cookie) cookiemap.get("cookievalue");
    return cookievalue;
    For reference I could not get getCookies() method of HttpServletRequest to work.. it would only return JSESSIONID.

  • I am giving away a computer, what is the best way to wipe out data prior to depature

    i am giving away a computer, what is the best way to wipe out data prior to depature

    Did the Mac come with two grey disks when new? If so, use disk one to erase the drive using Disk Utility and then re-install the OS from the same disk. Once installed, quit and when the new owner boots they can set it up as a new out-of-the-box Mac when they boot it up. The grey disks need to be passed on with the computer.
    If you need detailed instructions on how to erase and re-install please post back.
    If the Mac came with Lion or Mountain Lion installed the above process can be done using the Recovery HD as since Lion no restore disks are supplied with the Mac.
    The terms of the licence state that a Mac should be sold/passed on with the OS installed that was on the machine when new (or words to that effect).

  • What is the best way to back up photos and videos to a dvd from iPhoto, not in iPhoto format but just in jpeg format to access on either windows or mac

    what is the best way to back up photos and videos to a dvd from iPhoto, not in iPhoto format but just in jpeg format to access on either windows or mac

    When you export the videos out of iPhoto be sure to select Kind = Original.  Otherwise you'll just get an image file of the first frame of the video.
    OT

  • What is the best way to create E-Flyers and insert to Microsoft Outlook??

    What is the best way to create E-Flyers and insert to Microsoft Outlook??

    http://kb.mailchimp.com/article/how-to-code-html-emails
    Once created, the HTML document cab be placed in the Stationery folder.
    On a PC it's here.
    "C:\Program Files\Common Files\Microsoft Shared\Stationery"

  • What is the best way to switch off Daylight Saving Time?

    What is the best way to switch off Daylight Saving Time for a DST enabled timezone?

    I've been looking through the related classes and can't seem to find a way to disable DST in any timezone. Probably because they couldn't think of a good reason to want to know what the non-DST time was during DST.
    However, you could easily compute the time without DST if that's what you need.

  • What is the best way to reformat a mini and reinstall Mavericks

    What is the best way to reformat a mini and reinstall Mavericks?

    Hi ruthefrombenson!
    This article can help you erase your hard drive and reinstall Mavericks:
    OS X Mavericks: Erase and reinstall OS X
    http://support.apple.com/kb/PH14243
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • What is the best way to manage 5 users and 6 devices? We dont all want the same merged contacts, we dont all want the same calendar notes, music, pics etc etc.

    What is the best way to manage 5 users and 6 devices? We dont all want the same merged contacts, we dont all want the same calendar notes, music, pics etc etc.

    As long as it is pointed to iTunes it will be accessible via home sharing on Apple TV.
    http://support.apple.com/kb/HT1751?viewlocale=en_US&locale=en_US
    If these are commercial DVD's we can't comment on any conversion process.

  • What is the best way to insert massive data into an existing excel file?

    dear gurus,
    i am wondering that what is the best way to insert massive data into an existing excel file, more performance perspective.
    the file is read from BDS , and we want to insert data into it .
    the way i can think of is
    1. OLE AUTOMATION
       i think performance will be a big problem
    2. Office integration
        i am not sure it's facing the same performance issue ?
    3 . XXL_SIMPLE_API/FULL_API
        I am not sure whether they can insert data into an existing excel file?
    could you please give me some advices?
    br.
    jun

    Hi,
    If you want to APPEND data( add data to an existing excel file) from SAP, then use GUI_DOWNLOAD fm with APPEND = 'X' paramter.
    Best regards,
    Prashant

  • What is the best way to transfer my date from my old iMac to my new iMac?

    what is the best way to transfer my date from my old iMac to my new iMac? I don't have a time capsule, so I cannot use time machine.
    thanks

    Your best bet by far is to use Setup Assistant when the new Mac first starts up to transfer directly from the old one. 
    It's similar to Migration Assistant, but doing it that way will avoid having an extra user account.
    Either way, you can connect them via FireWire, Thunderbolt, or your network, but avoid wireless if at all possible.  You can connect both to your netwrork via Ethernet, or put a single cable between the two. 
    See Using Setup Assistant on Mountain Lion or Lion for details.

Maybe you are looking for

  • My itouch wont let me open apps

    it will let me open apps that are on it automatically but not apps that i got off the app store

  • Data from different databases in the same report.

    Hi Everyone, I am trying to build a reconciliation report in which I need to show the data from the source and target, side by side. Source and target are both different databases, although being oracle only Whenever a new data model is created, it g

  • Iphone wont restore after boot loop

    heres what happens i put the phone into recovery mode (with the home button and plugging cable in) because power button is broken, the connect to itunes screen shows and once in itunes i click restore then it says waiting for iphone, this is when the

  • Downloading (Exporting) Logo from SE78 in 4.7

    How can I download the logo? Please provide steps. I am using OAOR but I am not getting it since I am new to it. Its exporting it as FILE0001 with no format. Thanks Edited by: saad A on May 19, 2009 5:00 PM

  • Adobe acrobat enable issues

    Hi all, We have enabled extend features for adobe reader using adobe acrobat 8.0. But few days after its showing error as below "This document enabled extended features in Adobe Reader. The document has been changed since it was created and use of ex