If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > insert vb.net datetime into a db2 mm/dd/yyyy field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-16-04, 12:07
jpalazzi jpalazzi is offline
Registered User
 
Join Date: Nov 2004
Posts: 16
insert vb.net datetime into a db2 mm/dd/yyyy field

I have a vb.net program that takes the date of today system.datetime.now and inserts it into a db table. however system.datetime.now is mm/dd/yyyy hh.mm.ss and wont be accepted by the db2 database. how do i truncate it so it only inserts the date not the date and time.

thanks
Reply With Quote
  #2 (permalink)  
Old 11-17-04, 03:17
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
date versus timestamp

you can always convert this string to date with substring
and create a string 'yyyy-mm-dd'
will check if any builtin function for this
Best Regards, Guy Przytula
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On