If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > DateAdd function and format date

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-05-04, 05:03
gop373 gop373 is offline
Registered User
 
Join Date: Aug 2004
Posts: 77
DateAdd function and format date

dim coudate
coudate=request.querystring("numdateadd")
<%=DateAdd("d",coudate,date()%>

I want the result to show date in form year/month/day so I tried

<%=DateAdd("d",coudate,year(now())&"/"&month(now())&"/"&day(now()))%>

But the result stll show day/month/year. Anyone know how to format date to show year/month/day
Reply With Quote
  #2 (permalink)  
Old 11-09-04, 19:12
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Code:
<%
  dim coudate 

  coudate = DateAdd("d",request.querystring("numdateadd"),Now())

  Response.Write Year(coudate) & "/" & Month(coudate) & "/" & Day(coudate)
%>
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #3 (permalink)  
Old 11-09-04, 21:05
priyanka-m6.net priyanka-m6.net is offline
Registered User
 
Join Date: Jul 2004
Posts: 94
I hope, the code suggested by Seppuku has helped you out. if not let me know there is one more way of doing that.
__________________
Priyanka
Windows web hosting with ASP,.Net,PHP,Perl,MySQL support
We help in making your dreams come true on internet!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On