If this don't mess with your head - nothing will.
I need to take the value of now() eg 3/aug/2007 10:35pm and compress it to a much smaller code.
So far I have tried Hex(Now()) which results in 9987 which is ideal size
But how do I then get the 9987 back to a date format of 3/aug/2007 10:35pm?
3 1293 ADezii 8,834
Recognized Expert Expert
If this don't mess with your head - nothing will.
I need to take the value of now() eg 3/aug/2007 10:35pm and compress it to a much smaller code.
So far I have tried Hex(Now()) which results in 9987 which is ideal size
But how do I then get the 9987 back to a date format of 3/aug/2007 10:35pm?
I cannot for the life of me figure out why you would want to do this, but how about storing the number of seconds from an arbitrary Date/Time, say 1/1/2007 12:00 PM until Now() as in: - Debug.Print DateDiff("s", Now(), #1/1/2007 12:00 PM#)
-
'When I ran the code line, the Date/Time was 8/2/2007 9:39:26 PM. The Output was -18437966 which you would store internally.
- 'To retrieve the initial value of Now():
-
Debug.Print DateAdd("s",18437966,#1/1/2007 12:00 PM#)
-
'Produces 8/2/2007 9:39:26 PM
I don't really think that this is what you are looking for, but if you explain your reasoning for this request, we may be better able to arrive at a solution. BTW, to retrieve the Decimal Equivalent of your Hexadecimal Value returned from Hex(Now()), namely 9987, you can use Val(&H9987) which would return -26233, but I really do not know what the significance of this number is right now. Good night - going to bed!
I hope this helps..
I need to embed the date and time into a quote reference number without making it obvious that its a date and time
So the end format I'm looking for would be 7-132343.1986
The 7 representing the Sales Rep ID #
The 132343 being the consultation request #
The 1986 being the date/time code
This way I can extract the different items later for use in the admin backend.
This way the head office staff can look at a quote and know who raised the quote, what the consult request ID was and work out the date&time.
Oh its currently 12:37pm here in Melbourne, Australia. - Your the one who should be in bed :)
ADezii 8,834
Recognized Expert Expert
I hope this helps..
I need to embed the date and time into a quote reference number without making it obvious that its a date and time
So the end format I'm looking for would be 7-132343.1986
The 7 representing the Sales Rep ID #
The 132343 being the consultation request #
The 1986 being the date/time code
This way I can extract the different items later for use in the admin backend.
This way the head office staff can look at a quote and know who raised the quote, what the consult request ID was and work out the date&time.
Oh its currently 12:37pm here in Melbourne, Australia. - Your the one who should be in bed :)
How about appending something like the Julian Date and a Formatted Time to your Quote Reference Number. For instance, if I wanted to generate this number for 8/3/2007 @ 07:23:57, the code would be: -
DateDiff("d", #1/1/2007#, Now()) & Format$(Now(), "hhmmss")
-
This would produce 214072357 where 214 is the Julian Date and 072357 would be the time ( 7:23:57 AM) and the Quote Reference Code would now be: 7-132343.214072357. The Date/Time code is masked and easily retrievable.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: xixi |
last post by:
i have db2 udb v8.1 on windows 64 bit 2003 server, after db2 server
start , i found this in the db2diag.log, is this error?
2004-05-05-15.28.30.780000 Instance:DB2 Node:000...
|
by: jignesh shah |
last post by:
Hi all,
Is there a way to recover a single container if its been corrupted or
mark bad without restoring whole tablespace?
environment: db28.1/aix5.1/tsm/rs-6000.
Regards
Jignesh
|
by: Bill Grigg |
last post by:
I am attempting to set the UnicodeCompression property via code. The
following line "appears" to work:
tdf.Fields("State").Properties("UnicodeCompression").Value =
True
I can see the boolean...
|
by: Mangini |
last post by:
I'm writing backup/recovery procedures for a database (microsoft access xp)
that I want to sell, so I'm looking for a command line
compressor/decompressor multispan to symple export the database...
|
by: chris.atlee |
last post by:
I'm writing a program in python that creates tar files of a certain
maximum size (to fit onto CD/DVD). One of the problems I'm running
into is that when using compression, it's pretty much...
| |
by: mr.nimz |
last post by:
hello,
this is antenio. recently i've come to a problem. i got a way through
it, somehow, still it left me in a curious state, so i'm posting it
here, if i can get an answer from some techy,
...
|
by: Racerx |
last post by:
Hi All :
I use db2 8.1 fixpack 3 on AIX.
I recieved the following message in the diaglog
======================================================
ADM7513W Database manager has started.
...
|
by: Winder |
last post by:
Computer Data Recovery Help 24/7
Data recovering tools and services is our focus. We will recover your
data in a cost effective and efficient manner. We recover all
operating systems and media....
|
by: ahmurad |
last post by:
Dear Brothers,
I am struggling the following four Date-Time type values which were inputted into MYSQL database in different tables. As
MYSQL Default Time Format: YYYY-MM-DD HH:MM:SS, So I used...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |