Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 14th, 2005, 01:54 PM
Registered User
 
Join Date: Mar 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change date format

How can i change the format of this date:
'23-May-03' to '230403' or '23/04/03'
For a hole column in a table using asp.net

 
Old March 14th, 2005, 06:23 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

This is a classic ASP forum, for the best solutions .net issues should go in the .net area

BTW should '23/04/03' be '23/05/03'
    and '230403' be '230503'
As May is the 5th month not the 4th, my appolgies if I have assumed incorrectly.

Anyhow in classic ASP using vbScript you could:
-----------cut n paste-------------
   dim d,nd,td
   d = "23-May-03"
   response.write "'" & dateValue(d) & "'" & "<br>"

   nd =dateValue(d)
   td = Replace(nd, "/", "")
   response.write "'" & td & "'"
-----------------------------------



Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
CHANGE DATE FORMAT Vision G Access VBA 2 April 8th, 2008 12:16 PM
Change default date parameter format JeffHickman Reporting Services 0 February 14th, 2006 06:52 AM
how to change date format prasannagps Forum and Wrox.com Feedback 2 September 14th, 2005 01:28 PM
need to change date format desprate Access VBA 1 April 10th, 2005 12:45 PM
date format change yuvalk SQL Server DTS 2 March 29th, 2004 05:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.