\r\n\r\n
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > SQL server and dates :(


\r\n \r\n
 
 
Thread Tools Display Modes

\r\n\r\n\r\n
Actually there is two questions that bug me.
\r\n1. that will be simple I\'m apparantly can\'t too blind to make out a way to default a datetime column to the equivalent of NOW
\r\n2. thats more comestic but ...
\r\n
\r\n
Code:
\r\n
SELECT t1.f1, t2.f1 AS \'blub\', ....\r\nFROM t1, t2\r\nGROUP BY t1.f1, t2.f1
\r\n
now I havent yet managed it to display t2.f1 in any other the then format the SQL server like best (2005-07-27 00:00:00) and thats no good .I\'ve tried a CONVERT in the SELECT statement and in the GROUP statement but to no avail any help would be appreciated.
\r\n
\r\nMike
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n
\r\n __________________
\r\n there are always two sides of a story and 12 ways to sing a song or write some code. so whats wrong ?
\r\n
\r\nAvatar by lebb\r\n
\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n'; pd[1030210] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n
\r\n
\r\n  \r\n #2  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 07-27-2005, 11:22 AM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
HardCode\'s Avatar\r\n\r\n
\r\n \r\n HardCode\r\n HardCode is offline\r\n\r\n\r\n
Prev Previous Post   Next Post Next
  #1  
Old 07-27-2005, 11:14 AM
crabby's Avatar
crabby crabby is offline
mostly gone

Retired Moderator
* Expert *
 
Join Date: Aug 2002
Location: Oppum / Rhine area
Posts: 2,721
Default SQL server and dates :(


Actually there is two questions that bug me.
1. that will be simple I'm apparantly can't too blind to make out a way to default a datetime column to the equivalent of NOW
2. thats more comestic but ...
Code:
SELECT t1.f1, t2.f1 AS 'blub', ....
FROM t1, t2
GROUP BY t1.f1, t2.f1
now I havent yet managed it to display t2.f1 in any other the then format the SQL server like best (2005-07-27 00:00:00) and thats no good .I've tried a CONVERT in the SELECT statement and in the GROUP statement but to no avail any help would be appreciated.

Mike
__________________
there are always two sides of a story and 12 ways to sing a song or write some code. so whats wrong ?

Avatar by lebb
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->