Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2003, 08:19 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default date time ques... pls help

hi, im keep trying to get the datetime of end of today... do any1 know whats the syntex...?

here is what i using to get start of the day
StartOfDays=DateTime.today
but i just cant get the syntex to get the end of the day...

Regards
life's Ng

 
Old October 9th, 2003, 12:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

What do u want exactly!? what is the end of the day?!? do u mean time!?!?

Always:),
Hovik Melkomian.
 
Old October 9th, 2003, 05:29 AM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default

orh thanks Mr.Hovik, im sorry for the tread above, what i actually want is to get the time of the end of the day like this:
10/9/2003 23:59:59

and i use "DateTime.today" to get
10/9/2003 00:00:00

i got another way to achieve what i want this morning, but i dont mind to know more syntax to get the 10/9/2003 23:59:59 :p

Mind if i ask sir another question? pls take a look for my sql statement
dim MySQL as string="Select TimeIn, Staff , ServiceType from ServiceInfo where ServiceType='FollowUp' "

after the where clause, i tried to select those serviceType=FollowUp. Actually i also want to select those serviceType=Routine, i tried to use or as code below, but it dint work...

dim MySQL as string="Select TimeIn, Staff , ServiceType from ServiceInfo where ServiceType='FollowUp' or 'Routine'"

dim MySQL as string="Select TimeIn, Staff , ServiceType from ServiceInfo where ServiceType='FollowUp' And ServiceType='Routine'"

do sir know what i means? i want to select all those record with 'Routine' or 'FollowUp' in ServiceType field... i keep on trying, just cant get it work...
i know its better to use parameters, but if i cant make this work in normal way, i think i'll nv make it work with parameters... thanks for ur advice sir.

Best Regards
life's Ng



 
Old October 9th, 2003, 05:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why do you use Or in one of them and And in the other!? The last one should be OK as far as I can see and as long as you replace And with Or...
Code:
dim MySQL as string="SELECT TimeIn, Staff, ServiceType FROM ServiceInfo WHERE ServiceType='FollowUp' Or ServiceType='Routine'"
The other will not work for sure. Wrong syntax.

Jacob.

 
Old October 9th, 2003, 08:56 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to life_s Ng Send a message via MSN to life_s Ng
Default

thanks Mr.Jacob! do sir know how to get the 10/10/2003 23:59:59 ?
Cause i think my statement..... not very good....
dim MySQL as string="Select TimeIn, Staff , ServiceType from ServiceInfo where ServiceType='FollowUp' or ServiceType='Routine' And TimeIn like @a "
let say @A value is 10/10/2003, when i execute it, it select all the date, what i wish to c is onli 10/10/2003 record, and it show me 9/10/2003 ..... and so on....well, in my db, the TimeIn value is something like this 10/10/2003 15:20:34 ..... so i think i should use select Between 10/10/2003 00:00:00 and 10/10/2003 23:59:59 ......

Regards
life's Ng







Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting Time from Date/Time Navy1991_1 XSLT 2 June 3rd, 2008 12:03 PM
date and time in EST time zone anboss XSLT 1 May 21st, 2008 01:42 PM
How to retieve only the date not date and time debjanib ASP.NET 1.0 and 1.1 Professional 2 July 25th, 2006 01:10 PM
insert system date. no date and time jimmy Access VBA 6 November 20th, 2003 01:11 PM
Date and Time scottma135 VB Components 0 August 26th, 2003 10:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.