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 > MySQL > how can i extract date from datetime

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-06, 08:13
piyush15 piyush15 is offline
Registered User
 
Join Date: Nov 2006
Posts: 1
how can i extract date from datetime

hi sir
i m using vicidial.i have a CRM project in which i can access the asterisk database.but i have a problem in accessing some records

like..........

in the vicidial_agent_log table event_time fields datatype formate is like that
2006-09-15 00:00:00 but that formate not supported by VB.NET.
so how i can access only date from this.

i was trying with changing datatype DATETIME to DATE.but by query it takes default time 12:00 AM automatically.

can u have some guidence ,about that how can i extract only date from datetime

thankyou
Reply With Quote
  #2 (permalink)  
Old 11-21-06, 08:29
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,259
if you need the date in a sepecific format consioder using the the date formatting within MySQL as part of the SQL. I wouldn't normally suggest doing that as you risk loosing the abilitiy to sort on the date column or use it as a value in the front end.

It should be possible in the extract the data from MySQl in a foramt that VB.NET can use
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
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