Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default mySQL Update Date

    i want to update the time portion of a date column without knowing or change
    the actually day.

    so if the list of dates were

    xDate
    2006-01-12 21:00
    2006-01-13 18:00
    2006-01-14 16:00
    2006-01-15 10:00
    2006-01-16 19:00

    I want a query that can change all the times 16:00

    I am attempting something like

    update TABLE_NAME
    set xDate = date(date_format(xDate, '%y-%c-%d') & '21:00')

    that would keep the same day for every record but update the time to 21:00

    woribhabor Guest

  2. Similar Questions and Discussions

    1. Use a CFC to update a database with a date
      Hi All, I am trying to input a date in a database field with the current date. The datefield is in one table and I only want the date to be inserted...
    2. Update Access with today's date
      I am creating a form to allow the user to enter new records to an Access database. I want to have a hidden field that enters the date of record...
    3. PHP Date into MySQL
      Hi, I have the following script that is installed to obtain the date 7 days into the future and display 1 weeks worth of dates (minus Sunday). I...
    4. date mysql
      Hi I have troubles with converting a date value to unixtime! In mysql I have a table named date TYPE "DATE" (2003-09-05) Now I want it to convert...
    5. Date update?
      Does anyone know how to have the date on your home page update automatically? I can't find any code. Thanks in advance! --Nathan
  3. #2

    Default Re: mySQL Update Date

    I don't know mySQL syntax, but your suggested query looks like it wants a where clause of some sort.
    Dan Bracuk Guest

  4. #3

    Default Re: mySQL Update Date

    the where clause in inconsequential.

    woribhabor Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139