PC Review


Reply
Thread Tools Rate Thread

Creating simple batch numbers from selected date....

 
 
Blippy
Guest
Posts: n/a
 
      22nd Aug 2005
I want to create a small look up program that searches for a certain
date and the batch number that is represented by that day. For instance
if i wanted to find the batch for 20/08/05 i would choose that date and
then the program would tell me that it was batch 125. The batch number
are incremented by 1 everyday apart from SUNDAYS.

Is there an easy way that I can do this??? Here are some demo batch
numbers to show it all works...


Sat 20/08/05 batch num = 125
Mon 22/08/05 batch num = 126
Tue 23/08/05 batch num = 127
Wed 24/08/05 batch num = 128
Thur 25/08/05 batch num = 129
Fri 26/08/05 batch num = 130
Sat 27/08/05 batch num = 131
Mond 29/08/05 batch num = 132

Thanks in advance...

Scott boy
 
Reply With Quote
 
 
 
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      22nd Aug 2005
Blippy,

Probably you can do this mathametical. I would however create an arraylist
of DateTimes starting at your first date, than remove by looping backwards
through this array all sundays.
http://msdn.microsoft.com/library/de...classtopic.asp

And than I have in my idea a table with all batch numbers, where the index
is the batch number.

However not tested.

Cor


 
Reply With Quote
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      22nd Aug 2005
Hi,

In addition to Cor's comments you could use the datediff function to
determine how manys days the date is from the start date.

http://msdn.microsoft.com/library/de...ctdatediff.asp

Ken
----------------------------
"Blippy" <(E-Mail Removed)> wrote in message
news:txfOe.180$(E-Mail Removed)...
I want to create a small look up program that searches for a certain
date and the batch number that is represented by that day. For instance
if i wanted to find the batch for 20/08/05 i would choose that date and
then the program would tell me that it was batch 125. The batch number
are incremented by 1 everyday apart from SUNDAYS.

Is there an easy way that I can do this??? Here are some demo batch
numbers to show it all works...


Sat 20/08/05 batch num = 125
Mon 22/08/05 batch num = 126
Tue 23/08/05 batch num = 127
Wed 24/08/05 batch num = 128
Thur 25/08/05 batch num = 129
Fri 26/08/05 batch num = 130
Sat 27/08/05 batch num = 131
Mond 29/08/05 batch num = 132

Thanks in advance...

Scott boy


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a date from numbers in a field =?Utf-8?B?c2ltb24=?= Microsoft Access 2 13th Jul 2007 09:57 AM
Batch close selected programs =?Utf-8?B?U3Vl?= Windows XP General 4 21st May 2007 09:45 PM
simple ftp batch ?? kabucek Windows XP 0 9th Oct 2006 09:21 PM
Batch Workbook Printing for selected Ryeno24 Microsoft Excel Programming 0 13th Mar 2006 09:28 AM
Creating a batch file to append date to file names bladeraptor Microsoft Windows 2000 CMD Promt 13 5th Feb 2004 03:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:40 PM.