UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Convert Current Date Into A Serial Number, Office 2003    
 
   
foxtrojan
post May 5 2012, 01:40 PM
Post #1

UtterAccess Guru
Posts: 678
From: Singapore



How do you convert the current date to a number?. Example May 6 2012 to 20120506. I want to use this number as a BarCodeID for incoiming stock.
Go to the top of the page
 
+
Alan_G
post May 5 2012, 02:03 PM
Post #2

Utterly Yorkshire and Forum/Wiki Editor
Posts: 15,895
From: Devon UK



Hi

The following expression should do it -

CODE
CLng(Format(Date(),"yyyymmdd"))
Go to the top of the page
 
+
theDBguy
post May 5 2012, 02:06 PM
Post #3

Access Wiki and Forums Moderator
Posts: 48,593
From: SoCal, USA



Hi,

QUOTE (foxtrojan @ May 5 2012, 11:40 AM) *
How do you convert the current date to a number?. Example May 6 2012 to 20120506. I want to use this number as a BarCodeID for incoiming stock.

Do you only get one incoming stock for the day?

Just curious....
Go to the top of the page
 
+
Jeff B.
post May 5 2012, 03:00 PM
Post #4

UtterAccess VIP
Posts: 8,189
From: Pacific NorthWet



I'll echo DB's question ... can you guarantee you will NEVER have more than one "stock" incoming per day? (If more than one, consider using date AND time for that identifier... better still, use an autonumber field for the primary key on the table, and include a date/time field to show when...
Go to the top of the page
 
+
foxtrojan
post May 5 2012, 03:01 PM
Post #5

UtterAccess Guru
Posts: 678
From: Singapore



Thanks Alan, for the tip. I use it for my first part of my BarCodeID.
Hi DBguy, you 're great. No I do not have only one stock Received per day. sometimes a few hundreds. Actually I've two more fields [1] Stock Received ID [SRID] and
[2] ItemTotal [IRTL] I combine them to form the BarCodeID. The work-flow is very simple - Open the Stock Received, click an Icon, open a pop-up form, transfer the SRID over and the User enter the number of items received [IRTL]. Click Print and it will print the [DateSerialNumber - StockReceivedID - Number of Items.] If the Number of Items are 10, then 10 labels printed.
The DateSerailNumber also act as the source of the expriy date of items. You think this will work? My 6 cents.
Go to the top of the page
 
+
theDBguy
post May 5 2012, 10:02 PM
Post #6

Access Wiki and Forums Moderator
Posts: 48,593
From: SoCal, USA



Hi,

Yes, I think you're alright. Good luck with your project.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th June 2013 - 06:26 PM

Tag cloud: