Thanks Dan
What I did was to use what you sent, but then deleted the year part that
I had in.
I get a 10 digit number :-))
> Well looking at your code there is potential for 11 characters - first
> char of 0 from the year(a)-2004 statement (until next year when it'll
> be 1) and then double chars returned from all the other functions. Not
> sure how would be best to solve that in your situation.
>
>
>
> However to get the other functions always returning a leading zero for
> values below 10, try something like this :-
>
>
>
> uniqueID = Year(a)-2004
>
> uniqueID = uniqueID & right("0" & Month(a), 2)
>
> uniqueID = uniqueID & right("0" & Day(a), 2)
>
> uniqueID = uniqueID & right("0" & Hour(a), 2)
>
> uniqueID = uniqueID & right("0" & Minute(a), 2)
>
> uniqueID = uniqueID & right("0" & Second(a), 2)
>
>
>
> Dan
>
> ________________________________
>
> From: Martin [mailto:[EMAIL PROTECTED]
> Sent: 30 November 2004 13:34
> To: [EMAIL PROTECTED]
> Subject: [AspClassicAnyQuestionIsOk] Re: Newbie question unique
10
> digits
>
>
>
>
> Hi Dan
> Thanks for this. I think I have to say that in 6 years I have not
> noticed it not working then. In the past it has not been called for
> say a month at time. Now I am calling it every day I suspect that now
> I am spotting the failure.
>
> Can you give me any guidance as to how to ensure only 10 digits are
> returned?
>
> Many thanks
>
> Martin
>
> --- In [EMAIL PROTECTED], "Dan
Powderhill"
> <[EMAIL PROTECTED]> wrote: > As far as I'm aware the Month(),
Day(),
> Hour() and Minute() functions > will return a single digit if the
> respective part of the date is 9 or > under, and two digits if it is
> 10 or greater. I'm confused as to how > it's been working the way you
> suggest for 6 years though - unless it's > something to do with the
> date settings on your machine perhaps - have > they changed
recently?
> > > > > Dan > > > > ________________________________ > >
From: Martin
> [mailto:[EMAIL PROTECTED] > Sent: 29 November 2004 11:23 > To:
> [EMAIL PROTECTED] > Subject:
> [AspClassicAnyQuestionIsOk] Newbie question unique 10 digits > > >
> >
> > Hi > > I have been using the following for 6 years to generate a
> unique > transaction number. > > <% > Function uniqueID() > a =
Now()
> > uniqueID = Year(a)-2004 & Month(a) & Day(a) & Hour(a) & Minute
(a) >
> & Second(a) > End Function > %> > > Until yesterday this has always
> given me a 10 digit number.I MUST > have a 10 digit number. > >
Now I
> am getting 11 digits!! > > Can anyone shed some light on this? If not
> is there a way I can > restrict the number to 10 digits and still make
> it unique? > > Many Thanks > > Martin > PS ASP skills VERY basic >
> >
> > > > > > > > > > > Yahoo! Groups Sponsor > > ADVERTISEMENT >
click
> here >
>
<http://us.ard.yahoo.com/SIG=1290q3gue/M=298184.5639630.669973
5.300117
> 6/ >
>
D=groups/S=1705006764:HM/EXP=1101817848/A=2434971/R=0/SIG=
11eeoolb0/*h
> tt > p:/www.netflix.com/Default?mqso=60185400> > > >
> <http://us.adserver.yahoo.com/l?
> M=298184.5639630.6699735.3001176/D=group >
> s/S=:HM/A=2434971/rand=892903802> > > > >
> ________________________________ > > Yahoo! Groups Links > >
* To
> visit your group on the web, go to: >
> http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ > > * To
> unsubscribe from this group, send an email to: >
> [EMAIL PROTECTED] >
> <mailto:AspClassicAnyQuestionIsOk-
[EMAIL PROTECTED]
> subject=Un > subscribe> > > * Your use of Yahoo! Groups is subject
to
> the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> .
>
> > > > [Non-text portions of this message have been removed]
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
>
>
<http://us.ard.yahoo.com/SIG=129dp7all/M=296572.5585671.6651487.
300117
> 6/
>
D=groups/S=1705006764:HM/EXP=1101908131/A=2343726/R=0/SIG=
12i459p79/*h
> tt
>
p:/clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=11018
21731
> 30 5397>
>
<http://us.ard.yahoo.com/SIG=129dp7all/M=296572.5585671.6651487.
300117
> 6/
>
D=groups/S=1705006764:HM/EXP=1101908131/A=2343726/R=1/SIG=
12i459p79/*h
> tt
>
p:/clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=11018
21731
> 30 5397>
>
> Get unlimited calls to
>
<http://us.ard.yahoo.com/SIG=129dp7all/M=296572.5585671.6651487.
300117
> 6/
>
D=groups/S=1705006764:HM/EXP=1101908131/A=2343726/R=1/SIG=
12i459p79/*h
> tt
>
p:/clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=11018
21731
> 30 5397>
>
> U.S./Canada
>
<http://us.ard.yahoo.com/SIG=129dp7all/M=296572.5585671.6651487.
300117
> 6/
>
D=groups/S=1705006764:HM/EXP=1101908131/A=2343726/R=1/SIG=
12i459p79/*h
> tt
>
p:/clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=11018
21731
> 30 5397>
>
>
>
<http://view.atdmt.com/VON/view/yhxxxvon01900091von/direct/01/&tim
e=11
> 01 821731305397>
>
>
>
<http://us.adserver.yahoo.com/l?M=296572.5585671.6651487.3001176
/D=gro
> up s/S=:HM/A=2343726/rand=403370906>
>
>
>
> ________________________________
>
> Yahoo! Groups Links
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:AspClassicAnyQuestionIsOk-
[EMAIL PROTECTED]
> Un subscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> .
>
>
>
> [Non-text portions of this message have been removed]
>
>
> Yahoo! Groups Sponsor
>
>
> Get unlimited calls to
> U.S./Canada
>
>
>
>
>
>
> Yahoo! Groups Links
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
Martin
____________________________________________________
How to make 100,000pa or more trading the stock markets and how to
keep it.
http://www.learningtotrade.com
http//www.martincole.com
Support Page: http://www.learningtotrade.com/support.html
Support Email: [EMAIL PROTECTED]
***********************************************************************************
This email and any attachments may be confidential and the subject of
legal professional privilege. Any disclosure, use, storage or copying
of this email without the consent of the sender is strictly prohibited.
Please notify the sender immediately if you are not the intended
recipient and then erase the email from your in box and do not
disclose the contents to another person, use, copy or store the
information in any medium.
***********************************************************************************
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/