[AccessD] Date Conversion Problem

Drew Wutka DWUTKA at Marlow.com
Tue Jun 3 22:45:34 CDT 2008


LOL, I'm rooting for ya!

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at Beach Access Software
Sent: Tuesday, June 03, 2008 10:03 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Date Conversion Problem

Thanks again.  I'm hoping to have to fix that bug in 2100.  (I'll be 152.  I
think it's doable.)


Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com
www.bchacc.com
 
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
Sent: Tuesday, June 03, 2008 6:06 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Date Conversion Problem

Oops, goofed the mid statement...this'll do the trick:

gdatExpirationDate=DateSerial(val(right(gstrExpirationDate,2))+2000,val(
Left(gstrExpirationDate,2)),val(mid(gStrExpirationDate,4,2)))


That will work every time, (except the year part in the future...)

Drew
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Tuesday, June 03, 2008 7:28 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Date Conversion Problem

Damn! Close enough! gstrExpirationDate = 07-01-08 --> gdatExpirationDate =
2008-6-30.  Off by a day - very curious but not fatal.


Thanks. 


Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com
www.bchacc.com
 
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
Sent: 2008年6月3日 17:19
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Date Conversion Problem

Use DateSerial

(and I'd recommend using a 4 digit year text format, but here's how to do
this with just the two digits)

gdatExpirationDate=DateSerial(val(right(gstrExpirationDate,2))+2000,val(
Left(gstrExpirationDate,2)),val(mid(gStrExpirationDate,3,2)))

That will guarantee you get the right date (until the year 2100 (which is
why I recommend 4 digit years)).

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Tuesday, June 03, 2008 7:11 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Date Conversion Problem

Dear List:
 
I have a license expiration date encrypted in a key. I decode the expiration
date when the user starts the app and store it in a string which I then set
to a date type variable for display.
 
Works fine here.  The expiration date is 7/1/2008.  So I assemble the date
in a string = "07/01/08".  Then I set that equal to a variable of Date type
-gdatExpirationDate =  gstrExpirationDate - and gdatExpirationDate has
7-1-2008 in it.
 
When I set regional and Language to Chinese (PRC) of Chinese (Taiwan)
however, gdatExpirationDate has 2007-1-8.  
 
I can't figure out how to make the date display correctly from the string I
assemble from the key regardless of the Regional and Language Settings.  
 
Is there a way to do this so I don't have to know what the setting is?
 
MTIA
 
Rocky


 	
	
 
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com The information contained in this
transmission is intended only for the person or entity to which it is
addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
material. If you are not the intended recipient, please contact the sender
immediately and destroy the material in its entirety, whether electronic or
hard copy. You are notified that any review, retransmission, copying,
disclosure, dissemination, or other use of, or taking of any action in
reliance upon this information by persons or entities other than the
intended recipient is prohibited.


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 269.24.6/1480 - Release Date: 3/6/2008
07:00

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com The information contained in this
transmission is intended only for the person or entity to which it is
addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
material. If you are not the intended recipient, please contact the sender
immediately and destroy the material in its entirety, whether electronic or
hard copy. You are notified that any review, retransmission, copying,
disclosure, dissemination, or other use of, or taking of any action in
reliance upon this information by persons or entities other than the
intended recipient is prohibited.

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 269.24.6/1480 - Release Date: 3/6/2008
07:00

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.




More information about the AccessD mailing list