Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date 1

Status
Not open for further replies.

mary555

Programmer
Nov 9, 2005
185
CA
I have a javascript function in which I must put a date value in a variavle called start. on my asp page, i have a text field for month, one for day and one for year:
ie: user can enter 01 in the month box, 02 in the day box and 98 in the year box. the user the presses a button and the function will run.
I need this date to be in the format that iwll be accepted by Reporting Services...it would have to look something like 09/08/2006 12:00 AM
thanks
 
I'm sure there's a lot of us here that can help you. However:

[ul]
[li]You've not supplied even one line of code that you're having problems with. Have you even attempted to write it yourself, or did you want someone here to do the whole thing for you?[/li]
[li]You've stated that you have 3 pulldowns on your page already for month, day, year. However, in the outputted date you want the time to appear as well. How is that number supposed to be generated? Always 12am?[/li]
[li]Since starting your membership you've asked 39 questions and never once clicked the "thank xxxx for this valuable post". Any reason why?[/li]
[li]It's only been 40 mins since you initially asked your question, you seem a bit demanding already coming back and asking why nobody has posted yet. It's Friday on a holiday weekend - I'm sure that many people have already gone home for the day, or are out of town. I wouldn't expect speedy responses.[/li]
[/ul]

-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
wow, alright then.
Code:
<script type="text/javascript">
<!--
function go(){

var Start = new Date(10,11,89,00,00,00)

alert (testDate.toLocaleString())
var End=frmS.Day2.value+"/"+frmS.Month2.value+"/"+frmS.Year2.value+" 00:00:00";


....i've tried these methods for getting the right format for the date but none are working with Reporting services. I've tried many other things but I have deleted them.



Yes I was it always for 12AM

I never knew about the "thank xxx for this valuable post" until a week ago about and since then i have used it once.

Normally I get a response within 20 minutes and I have to finish this up and so I'm so very sorry if it bothered you that I wrote back a second time.

Sorry kaht for obviously upsetting you greatly with my post...

 
ok, first

I found your response (particularly the last line) to be very sarcastic towards my reply above. All of my comments posted above were very legitamite questions pertaining to this forum and your question. To respond with a smart-@$$ comment is usually means for many people to get banned from this site (especially people that don't take much time to answer others' questions - as your profile implies) I did not deserve that and I think I now deserve an apology.

second

It is understandable that you may have not known about the stars/voting system until a week ago. Many people that ask many questions here don't ever bother to learn the system of how this site works. They come here, ask their questions, get their answers and leave until they have another question. For this reason I tend to point out the link when people have asked a large handful of questions without awarding stars. And with regard to "and since then i have used it once" - your profile shows no awarded stars to other members. So perhaps you did not click the confirmation link that pops up?

third

I understand that you may be under the gun to get your project done and for that reason are hasty to get a response from this forum. As I mentioned, it is a holiday weekend and I personally can't wait to get out of the office. It's been a slow day and I have a big trip planned. So, for that reason I can sympathize with your situation and as such have not "red flagged" this post. Instead, here's a potential short solution to your problem. Hope it helps you out, and you can relax this weekend. Happy Independence Day [unclesam]

Code:
<script type="text/javascript">

function blah() {
   var yr = document.getElementById("yr").value;
   var mth = document.getElementById("mth").value;
   var dte = document.getElementById("dte").value;
   
   alert("here's your date: " + mth + "/" + dte + "/" + yr + " 12:00AM");
}

</script>

<select id="yr">
   <option value="2005">2005</option>
   <option value="2006">2006</option>
</select>

<select id="mth">
   <option value="01">Jan</option>
   <option value="02">Feb</option>
   <!--etc-->
</select>

<select id="dte">
   <option value="01">01</option>
   <option value="02">02</option>
   <!--etc-->
</select>

<input type="button" value="click me" onclick="blah()" />

-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
Thank-you...And I apologize for being rude.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top