By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,636 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,636 IT Pros & Developers. It's quick & easy.

date conversion

P: 6
i want to convert date from MM/dd/yyyy format to dd/MM/yyyy fromat
and add 30 days to the new formatted date.
Please reply soon.
Sep 11 '06 #1
Share this Question
Share on Google+
5 Replies


P: 1
i want to convert date from MM/dd/yyyy format to dd/MM/yyyy fromat
and add 30 days to the new formatted date.
Please reply soon.
Answer:
Hi friends this porblem solve by this way

use
dim d as date now.date()
dim ds as string
ds = format(d,"dd/MM/yyyy) // output = 24/02/2007
ds = format(d,"dd-MMM-yyyy) // output = 24-Feb-2007
Jun 26 '07 #2

gits
Expert Mod 5K+
P: 5,343
hey ;)

you want to do this on clientside with javascript? or before displaying the dates convert it on serverside?

the above solution looks like asp.net ... and may help on serverside ...

kind regards ...
Jun 26 '07 #3

acoder
Expert Mod 15k+
P: 16,027
i want to convert date from MM/dd/yyyy format to dd/MM/yyyy fromat
and add 30 days to the new formatted date.
Please reply soon.
This page contains some date formatting functions.

To add 30 days, just add 30 to the date (setDate to getDate+30) and the Date object will automatically rollover to the next month/year is required.
Jun 26 '07 #4

acoder
Expert Mod 15k+
P: 16,027
Answer:
Hi friends this porblem solve by this way

use
dim d as date now.date()
dim ds as string
ds = format(d,"dd/MM/yyyy) // output = 24/02/2007
ds = format(d,"dd-MMM-yyyy) // output = 24-Feb-2007
Welcome to TSDN and thanks for sharing your solution!

Unfortunately, it seems like a vbscript type of solution instead of a Javascript one. At least it got the thread answered after a very long time!
Jun 26 '07 #5

gits
Expert Mod 5K+
P: 5,343
... ;) i didn't saw that orig-posting-date ... wow ... that was really a long time ;)) ...
Jun 26 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.