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

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 October 20th, 2004, 05:03 AM
Caroline Caroline is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 2 Caroline User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Datetime---URGH! please help

I am currently trying to pull information of a SQL Server.
I have a [lastupdate] field which is in Datetime format.
Here is my code

Select * FROM DPRData Where Location = 'All PCGs' And lastupdate Like '%23:59:59' order by ID desc

Our system updates every hour and I need the last update which is at 23:59:59 every day for a whole month.

I have tried everything eg:

Select * FROM DPRData Where Location = 'All PCGs' And lastupdate Like '%23:59:59%' order by ID desc

Select * FROM DPRData Where Location = 'All PCGs' And lastupdate = '23:59:59' order by ID desc

This actually works and brings back the last entry for that day however bringing back every day....

Select * FROM DPRData Where Location = 'All PCGs' And lastupdate = '20041010 23:59:59' order by ID desc

I am pretty new to this and generally I can search on google and get my answers. However I am going to get in a lot of trouble at work if I don't find a solution so please help.

Caz

Reply With Quote
  #2  
Old October 21st, 2004, 07:17 AM
bonfree bonfree is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 bonfree User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Casting from String to Date in J2ME

Hi Guys,
I am calling a method that manipulates the Database to come up with the date but when it comes back to the method its a string so I either need to cast the string to date or use date variable in the method either way i need to know the code of casting or using the date variable in the method to fetch the database for a date.

thanking you in advance for all your support.

Ayaz

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Datetime---URGH! please help


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
Stay green...Green IT