Click here to Skip to main content
15,901,035 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: InstallShield Project Compilation,Plz......Help Pin
ChandraRam1-Nov-06 0:01
ChandraRam1-Nov-06 0:01 
GeneralRe: InstallShield Project Compilation,Plz......Help Pin
Jeeva Mary Varghese1-Nov-06 0:15
Jeeva Mary Varghese1-Nov-06 0:15 
Questionexcel and word Pin
Sebastian T Xavier31-Oct-06 17:44
Sebastian T Xavier31-Oct-06 17:44 
AnswerRe: excel and word Pin
PavanPareta31-Oct-06 21:31
PavanPareta31-Oct-06 21:31 
Questionhow to convert html file in doc file with same format. Pin
PavanPareta31-Oct-06 17:19
PavanPareta31-Oct-06 17:19 
QuestionDate and Time Pin
steve_rm31-Oct-06 16:19
steve_rm31-Oct-06 16:19 
AnswerRe: Date and Time Pin
Janani Divya31-Oct-06 17:05
Janani Divya31-Oct-06 17:05 
AnswerRe: Date and Time Pin
Guffa31-Oct-06 20:15
Guffa31-Oct-06 20:15 
steve_rm wrote:
I can't have the fields as dateTime, as I don't want to display a pop calandar in my ultragrid.


Don't let limitations like that mess up your database design. Store the datetime properly in the database, and convert it to strings when you are fetching data to be used with that component.

steve_rm wrote:
Is there a problem with the code?


You have been "helped" by VB to convert the values back to DateTime. The extra conversions that are added, as you are storing the values in DateTime variables, are equivalent to:

time = Convert.ToDateTime(Date.Now.ToShortTimeString())
day = Convert.ToDateTime(Date.Now.ToShortDateString())

A DateTime structure always has a date and a time, and no information about formatting. If you convert a string containing only a date to a DateTime, it will get the time 0:00. If you convert a string containing only a time, it will get the current date.


---
b { font-weight: normal; }

Questionhow to change the datagrid column based on an adjacent column's true or false Pin
Durgamalli31-Oct-06 16:17
Durgamalli31-Oct-06 16:17 
AnswerRe: how to change the datagrid column based on an adjacent column's true or false Pin
nlarson111-Nov-06 6:50
nlarson111-Nov-06 6:50 
QuestionEvent Pin
Socheat.Net31-Oct-06 16:01
Socheat.Net31-Oct-06 16:01 
AnswerRe: Event Pin
Alex Feature31-Oct-06 19:31
Alex Feature31-Oct-06 19:31 
GeneralRe: Event Pin
Socheat.Net3-Nov-06 15:38
Socheat.Net3-Nov-06 15:38 
QuestionCrystalReports in vb.net: How to change SqlSelectCmd used for a report Pin
mp000131-Oct-06 14:18
mp000131-Oct-06 14:18 
QuestionFormating strings in VB6 Pin
No-e31-Oct-06 10:08
No-e31-Oct-06 10:08 
AnswerRe: Formating strings in VB6 Pin
SNathani31-Oct-06 15:46
SNathani31-Oct-06 15:46 
AnswerRe: Formating strings in VB6 Pin
Guffa31-Oct-06 20:00
Guffa31-Oct-06 20:00 
GeneralRe: Formating strings in VB6 Pin
ChandraRam31-Oct-06 23:05
ChandraRam31-Oct-06 23:05 
QuestionHow do you set the DateTimePicker at runtime ? Pin
Shawn Owens31-Oct-06 10:03
Shawn Owens31-Oct-06 10:03 
AnswerRe: How do you set the DateTimePicker at runtime ? Pin
Dave Kreskowiak1-Nov-06 4:05
mveDave Kreskowiak1-Nov-06 4:05 
Questionaccessing data from another programs form Pin
njdnjd31-Oct-06 9:54
njdnjd31-Oct-06 9:54 
QuestionFormat number Pin
jds120731-Oct-06 9:01
jds120731-Oct-06 9:01 
AnswerRe: Format number Pin
Christian Graus31-Oct-06 9:14
protectorChristian Graus31-Oct-06 9:14 
GeneralRe: Format number Pin
jds120731-Oct-06 9:34
jds120731-Oct-06 9:34 
GeneralRe: Format number Pin
jds120731-Oct-06 10:27
jds120731-Oct-06 10:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.