Update Datetime field from date and time columns in ms access
<p>I need to update a field with date and time fields. but it does not add the time value into it. I can see only date value being added.</p>

<p>Tried using below statement</p>

<pre><code>set TransDateTime =cdate('#' + cstr(Transaction_Date) + ' '  + cstr(transaction_time) + '#'  
</code></pre>

<p>or </p>

<pre><code>set TransDateTime =cdate(Transaction_Date) + ' '  + cstr(transaction_time) 
</code></pre>

<p>I added the column with datetime but the values are only dates.</p>

<p>Ended up using a numeric type using below query</p>

<pre><code>alter table table1 add TransDateTime numeric(14,0) 

update table1 set TransDateTime =ccur(year(transaction_date) &amp; format(month(transaction_date),'00') &amp; format(day(transaction_date) ,'00') 
                        &amp; format(hour(transaction_time),'00') &amp; format(minute(Transaction_time),'00') &amp; format(second(transaction_time),'00'))
</code></pre>

<p>Which served the purpose</p>