Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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 25th, 2004, 07:54 PM
Registered User
 
Join Date: Oct 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Happygv, both you and madhukp have helped me much more than I helped myself... I'm just doing the tweating part...

And you are absolutely right though... Initially, I have named the date fields in the database seperately for the Dates... But have already altered them...

Thanks again for the much needed advice... You guys are very friendly, I love this place a lot...

best regards,
Lawrence

 
Old October 4th, 2007, 06:31 PM
Authorized User
 
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Helpme,

I am glad to see your topic is same like what i want now.
I not understand as below:

sql = "SELECT Field1,Field2,Field3,Field4 FROM Table1 WHERE MyMonth = " & MM & " and MyYear = " & yyyy

If my Access database column is date, i wonder how am i call out the month and year value. Can anyone help me?




apple
 
Old October 4th, 2007, 07:17 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

You wrap a function around it like:

sql = "SELECT DATENAME(MONTH,someDateTypeFieldName),Field2,Field 3,Field4 FROM Table1 WHERE MyMonth = " & MM & " and MyYear = " & yyyy & ";"

Of course 'SELECT DATENAME(MONTH,someDateTypeFieldName)' will give you the month name value from your stored date. Im sure you can work out how to get the year value based on what I have above.

FYI : You should have started a new post with a logical subject so others can benefit from your solution!!! Please do this next time?


Wind is your friend
Matt
 
Old October 5th, 2007, 03:20 AM
Authorized User
 
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Thank you for your advice. I already issue a new topic name: Seek help for select Month list box.

By the way, can you explain for me

sql = "SELECT DATENAME (MONTH,someDateTypeFieldName),Field2,Field3,Field4 FROM Table1 WHERE MyMonth = " & MM & " and MyYear = " & yyyy & ";"

What is (MONTH,someDateTypeFieldName) means? I dont know apply to my coding. Hope to hear from you soon.

apple
 
Old October 6th, 2007, 08:37 AM
Authorized User
 
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Matt,

Thanks for your help. I got it.
Have a nice day

apple





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP - drop down box issues mhodges Classic ASP Professional 2 November 28th, 2006 07:23 PM
drop down box selected value crmpicco HTML Code Clinic 1 March 31st, 2005 09:56 AM
ASP - Drop Down Box with Dates HelpMe Classic ASP Databases 1 October 21st, 2004 10:39 AM
Drop down Box NomAnor Classic ASP Basics 2 March 29th, 2004 12:21 PM
Search using drop down list box and a text box tcasp Classic ASP Basics 1 July 31st, 2003 02:58 PM





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