Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 11th, 2008, 09:05 PM
Authorized User
 
Join Date: Dec 2007
Location: , , Vietnam.
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
Default Automatic datetime

I have some problem about the date time.I want to save a database with write by access that ID such as:yymm####
yy;year get two numbers(2008)->08
mm:month get two numbers->02
####:the order:0001,0002
the whole function:08020001
when i save a customer that,Id increase 08020002,...,08020010...
but step another month that increase 08030001,08030002,...,08030010..
and go on like that
and also the year increase(2009) :09010001,..09010010
Please help me to do that
thanks so much
Regards.
Hoang Phuc

Reply With Quote
  #2 (permalink)  
Old February 12th, 2008, 10:21 PM
Authorized User
 
Join Date: Dec 2007
Location: , , Vietnam.
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
Default

please help to do that.I need that code or your know another page that give the same code.
thanks
Regards

Reply With Quote
  #3 (permalink)  
Old February 13th, 2008, 07:23 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Have you treid to write the code? If so post it and explain where you issue is, if not you need to at least give it a go.

To get the best out of forums - Come here and take peoples time for problems within solution, not to have complete solutions written for you

Wind is your friend
Matt
www.elitemarquees.com.au
Reply With Quote
  #4 (permalink)  
Old February 17th, 2008, 10:23 PM
Authorized User
 
Join Date: Dec 2007
Location: , , Vietnam.
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
Default

please check the code that wrote
i try do it but not run
if trim(request("Option"))="AddOrder" then
        Set rs = Server.CreateObject("ADODB.Recordset")
       ' rs.Open "orderdetail", conn, 1, 2
          rs.CursorType = 1

          rs.LockType = 3

          rs.Open "orderdetail", Conn

        ' Adding data
            rs.AddNew
         if not rs.eof then
                    strmonth=Right("0" & DatePart("m", Now()), 2)
                    strday=day(date())
                    stryear=Right(DatePart("yyyy", Now()), 2)
                    NewOrderNumber=(rs("orderID")+1)
                    NewsOrderID=stryear & strmonth & strday & Right("0000" & NewOrderNumber, 4)
                    if not rs.eof then

                    'OrderID=session("OrderID")
                        NewOrderNumber=(rs("orderID")+1)
                        OrderID=NewsorderID

                    end if

                   rs("OrderID")= NewsorderID
                rs("CustomerId") = CustomerId
                rs("Item") = Items
                rs("Description") = Descriptions
                rs("Quantity")=Quantity
                rs("price") = price
                rs("UnitCurrency") = UnitCurrency
                rs("CreateDate") = CreateDate
                rs("ExpirationDate") = ExpirationDate
            response.Write(OrderID)
            'rs.Update
                    end if
            session("Neworderid")=NewsorderID
            session("Item")=items
            session("Descriptions")=Descriptions
            session("Quantity")=Quantity
            session("price")=price
            session("UnitCurrency")=UnitCurrency
            session("CreateDate")=CreateDate
            session("ExpirationDate")=ExpirationDate

        response.Redirect "ShowOrderdetail.asp"
        rs.Close
            Set rs = Nothing
    end if

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Update odezzie Classic ASP Databases 1 March 28th, 2007 06:06 PM
Automatic Download mailme.ami J2EE 1 November 24th, 2006 08:14 AM
UTC DateTime to Local DateTime r_ganesh76 SQL Server 2000 1 April 4th, 2005 08:21 AM
Automatic Redirect r_ganesh76 General .NET 3 September 9th, 2004 07:03 AM
Automatic URLs Imar Forum and Wrox.com Feedback 13 June 19th, 2003 03:01 AM



All times are GMT -4. The time now is 07:09 PM.


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