File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Date Time issue using javascript? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Date Time issue using javascript?" Watch "Date Time issue using javascript?" New topic
Author

Date Time issue using javascript?

prabhu pandurangan
Ranch Hand

Joined: May 23, 2008
Posts: 132
Hi Members,
In my javascript function im having my date in the format of
'yyyy-MM-dd HH:MM:ss' and im setting it to a javascript variable and when i try to access it using 'request.getParameter("");' in my action class, im getting the date in the format of 'yyyy-MM-dd', but i need the same format as in javascript function, even i tried using alert(), in my javascript code, it works fine, but in my action class im getting only the date alone, time is missing....

Please help me out in this.....

Looking forward for your reply...

Regards,
Prabhu.

[ July 07, 2008: Message edited by: Bear Bibeault ]
[ July 07, 2008: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

Please do not post text in CODE tags. I have fixed your post for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
prabhu pandurangan
Ranch Hand

Joined: May 23, 2008
Posts: 132
Hi Bear,

Thank you very much.
Then for text message is it fine to send with out adding any UBB code.

Ok fine bear, solution for my thread..... I hope you could understand my question...

Regards,
Prabhu.
prabhu pandurangan
Ranch Hand

Joined: May 23, 2008
Posts: 132
Hi Bear,

In my alert condition in javascript im getting the date with time instance, but when i get it using request.getparameterValues(), im not getting the exact date with time instance......

I think there is a space between date and time, as my format is
'yyyy-MM-dd HH:mm:ss', the space in between date and time is taken by server and so im getting the date alone..

Please provide me some solution for this...

Regards,
Prabhu.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

You'll need to show us the code where you set up the date in the page. Please be sure to use CODE tags for the code, but not plain text.
prabhu pandurangan
Ranch Hand

Joined: May 23, 2008
Posts: 132
Hi Bear,
Sorry bear, i will post my thread within code tags.
I got solution to my post, actually i made a mistake in retrieving the data.

Regards,
Prabhu.

[Edit - Quotes tags are meant to quote another user. They are not meant to post your own text in them.]
[ July 08, 2008: Message edited by: Eric Pascarello ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What is this magical JavaScript code that we hear some much about?

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date Time issue using javascript?