Discussion:
Format number sequence with date
(too old to reply)
Celeste
2010-08-25 15:02:03 UTC
Permalink
Hi
Is it possible to setup the number sequence format to a date?
For example, I want a number sequence that will have the following structure
(if today == 2010/08/25):

2010/08/25_1 and the number sequence that will follow on that would be
2010/08/25_2.

Thus the last character will be the number allocation, but the first 10 will
be the current date.

Is it possible?

(I’m just curios, I don’t want to necessarily climb into the number sequence
classes’ code…)

Thanks!
--
//https://www.xing.com/profile/Celeste_Lategan
Luegisdorf
2010-08-26 13:22:03 UTC
Permalink
Hi Celesete

Numbersequence does not support dynamic information such current date.

But what about building the key by code:

NumberSeq numberSeq:
str no;
;
ttsbegin;
numberSeq = NumberSeq::newGetNumFromCode("seq_744");
no = date2strXPP(systemDateGet()) + numberSeq .num();
numberSeq.used();
ttscommit;

Regards
Patrick
Post by Celeste
Hi
Is it possible to setup the number sequence format to a date?
For example, I want a number sequence that will have the following structure
2010/08/25_1 and the number sequence that will follow on that would be
2010/08/25_2.
Thus the last character will be the number allocation, but the first 10 will
be the current date.
Is it possible?
(I’m just curios, I don’t want to necessarily climb into the number sequence
classes’ code…)
Thanks!
--
//https://www.xing.com/profile/Celeste_Lategan
unknown
2010-08-26 20:22:06 UTC
Permalink
NumberSequence won't reset to 1 at the start of a new day though.
You'll have to custom code it. You can create a new table to keep track of
the numbers used.
--
Mathieu Vaillancourt
http://vaillancourtm.blogspot.com
Celeste
2010-08-27 08:02:06 UTC
Permalink
Thanks Patric and Mathieu!

I'll give it a try.
--
//https://www.xing.com/profile/Celeste_Lategan
Post by unknown
NumberSequence won't reset to 1 at the start of a new day though.
You'll have to custom code it. You can create a new table to keep track of
the numbers used.
--
Mathieu Vaillancourt
http://vaillancourtm.blogspot.com
Loading...