Ask a Question related to Dreamweaver AppDev, Design and Development.
-
bthouin #1
Disappearing date (ASP, JS)
Hi,
I have a terribly simple problem, but can't see the (probably obvious)
solution:
I have a listbox with date entries. When I first wanted to get the entry
selected by the user, I needed actually to store it in a session
variable, so I did it that way:
var compVersion = Request.Form("compVers");
Session("CompVersion") = compVersion;
This promptly generated an error, telling me that one cannot store an
implicit variable in a session variable, or something like that. OK, I
thought, I'll use trick 57, and changed it to:
var compVersion = Request.Form("compVers");
Session("CompVersion") = Date(compVersion);
No error anymore, but... when I know print the content of
Session.Contents("CompVersion"), I get... "undefined", although a print
of the variable after the first code line gives me exactly the data as I
expect it !!!
So, how do I save my date entry in a session variable, so that I can use
it later as a date again ?
Thanks for help
Bernard
bthouin Guest
-
JSObject returns wrong date. How can Iextract correct date from digital signature?
I'm trying to extract name and date from digital signatures by using JSObject in Excel VBA, but JSObject returns wrong date. Year, month, hour and... -
#39245 [NEW]: date function generate wrong date with 1162083600 timestamp
From: lohner at aldea dot hu Operating system: Linux PHP version: 5.1.6 PHP Bug Type: Date/time related Bug description: ... -
Convert date/time to date in SQL Server 2000 statement
Can this be done? tia -
converting date into database date format(newbie)
Hi! U can convert "8-Aug-03" into mysql date which requires yyyy-mm-dd format as below. <?php date("Y-m-d",strtotime("8-Aug-03")); ?> -
How do I manipulate a date variable to a specific date array?
Hi, I use the getdate() function to return today's date in an array. I do this as I need to separate the day/month/year as to display them in a... -
Julian Roberts #2
Re: Disappearing date (ASP, JS)
My suggestion to newbies is to use VB Script, a bit easier to get to grips
with than Javascript. With JS, you need to cast the variable to a string. eg
Session("CompVersion") = String(Request.Form("compVers"))
--
Jules
[url]http://www.charon.co.uk/charoncart[/url]
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004
Julian Roberts Guest
-
bthouin #3
Re: Disappearing date (ASP, JS)
Julian Roberts wrote:
Ok, Jules, that's what I did, but then, when I pass that session> My suggestion to newbies is to use VB Script, a bit easier to get to grips
> with than Javascript. With JS, you need to cast the variable to a string. eg
>
> Session("CompVersion") = String(Request.Form("compVers"))
>
variable to the next page, which is in VBScript (!), how do I turn that
string back to a date ? CDate(string) gives me an error...
Bernard
bthouin Guest
-
bthouin #4
Re: Disappearing date (ASP, JS)
Julian Roberts wrote:
Some more info:> My suggestion to newbies is to use VB Script, a bit easier to get to grips
> with than Javascript. With JS, you need to cast the variable to a string. eg
>
> Session("CompVersion") = String(Request.Form("compVers"))
>
- I originally entered the date in SQLServer in a date field as
"01.02.2005" (1st of Feb 2005, European notation)
- the value read from SQLServer looks like this: "Tue Feb 1 00:00:00
UTC+0100 2005"
- this, put into a string in the session variable is NOT recognized as a
valid date by the VBScript IsDate and CDate functions !!! So much for
compatibility...
Does this mean I now have to split that string and handle it myself ? I
find that outrageous !
Bernard
bthouin Guest



Reply With Quote

