ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 11th, 2000, 08:01 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Date Problems

<i><b>Originally posted by : Kevin Byrne (kevinb@terranovamedia.com)</b></i><br />Hi there,<br />I am having some problems and wondered if anyone could help?<br />I have a datetime field in my SQL database which has this format : 4/10/00 12:00:000.<br />I need to strip the time out and rearrange the format of the date.It should look like this: 10/4/00.The date should match a date being supplied by a HTML form.<br />I have tried using DATEPART and concatenating each part of the date with a slash ie "/" and also turning it into a string to try to get it to match using SUBSTRING but I can't seem to be able to query the substring created without putting it into a view....<br />Here is the SQL code:<br />SELECT ITEM_ID,<BR><br />SUBSTRING(<BR><br />CAST(DATEPART(dd,INVOICE_ITEM_WINNING_BIDS.BID_DAT E) AS char(2)) + '/' + <BR><br />CAST(DATEPART(mm,INVOICE_ITEM_WINNING_BIDS.BID_DAT E) AS char(2)) + '/' +<BR><br />CAST(DATEPART(yy,INVOICE_ITEM_WINNING_BIDS.BID_DAT E) AS char(4)),1,9)<BR><br />AS BID<BR><br />FROM <BR><br />INVOICE_ITEM_WINNING_BIDS<BR><br />WHERE<BR><br />BID = "4/10/2000"<BR><br /><BR><br />Any help would be appreciated.<br />Many thanks,<br />Kevin<br /><br /><br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Date Problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway