Append time to selected small date time field

Discussion in 'ASP General' started by gil, Apr 16, 2005.

  1. gil

    gil Guest

    I'm trying to INSERT based on info selected from another table.

    How can I concatenate a string of time to the column 'myDate' below (the
    value being inserted)?

    INSERT INTO c5 (appointmentStart) " & _
    "SELECT myDate FROM dbo.myAppointments, c5 WHERE ...


    So above myDate is inserted into appointmentStart, which is a date time
    field. I need to append the time from a string to myDate so appointmentStart
    inserts something like: 4/25/2005 12:00:00 AM

    Thank you
     
    gil, Apr 16, 2005
    #1
    1. Advertising

  2. gil

    Phil Guest

    I got it.


    "gil" <> wrote in message
    news:%...
    > I'm trying to INSERT based on info selected from another table.
    >
    > How can I concatenate a string of time to the column 'myDate' below (the
    > value being inserted)?
    >
    > INSERT INTO c5 (appointmentStart) " & _
    > "SELECT myDate FROM dbo.myAppointments, c5 WHERE ...
    >
    >
    > So above myDate is inserted into appointmentStart, which is a date time
    > field. I need to append the time from a string to myDate so

    appointmentStart
    > inserts something like: 4/25/2005 12:00:00 AM
    >
    > Thank you
    >
    >
    >
     
    Phil, Apr 16, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robin
    Replies:
    2
    Views:
    6,320
    =?Utf-8?B?Sm9obiBTaXZpbGxh?=
    Aug 4, 2004
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,358
    Michael Borgwardt
    May 30, 2004
  3. HYRY
    Replies:
    10
    Views:
    641
    Bruno Desthuilliers
    Sep 26, 2007
  4. PerlFAQ Server
    Replies:
    0
    Views:
    140
    PerlFAQ Server
    Feb 1, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    127
    PerlFAQ Server
    Mar 31, 2011
Loading...

Share This Page