Converting Date and Time to a standard number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here's my problem, I need a way to convert a date and time into a standard
number and that this conversion will only take place when a specific option
is selected on the form. For example, 6/29/2005 1:00 p.m. should read
62920051300. I'm at a loss for how to do this conversion. The date and time
are in seperate fields on the form. An alternative to using this information
is converting the current date and time using the =Now() function into a
number as well.


Now, this conversion can only happen if 1 of the 2 selections on a combo box
are selected. The 2 choices in the combo box are Trouble Ticket or
Informational Ticket. When the person entering information chooses the
Trouble Ticket option I do not want the above mentioned conversion to take
place (reason for this is that the rep calling in the issue will be given a
ticket number). My understanding is that some VB code will need to be run,
however I know very little about programming in VB and am stuck with that
part too.

Any help will be very much appreciated.
 
Try this

format("DateTime","mdyyyyhhmm") 'without leading zero
format("DateTime","mmddyyyyhhmm") 'with leading zero
 
Correct me if I'm wrong, but won't that store that data as a date/time? If
so, that will not work. I need to save it as a string of numbers. I need
someway to convert the date and time to a sequence of numbers, and then enter
that into a seperate field if a condition occurs.

Sean Skallerud
 
Back
Top