PC Review


Reply
Thread Tools Rate Thread

How to convert Date stored in Long Integer format to mm/dd/ccyy

 
 
=?Utf-8?B?VGhlaw==?=
Guest
Posts: n/a
 
      17th Feb 2006
In my Access Database, I have a date in a field with Data Type Number(Long
Integer) in Access. I need a function to convert this Long Integer to a
regular Date Format (mm/dd/ccyy)
 
Reply With Quote
 
 
 
 
=?Utf-8?B?S0FSTCBERVdFWQ==?=
Guest
Posts: n/a
 
      17th Feb 2006
Try this --
CVDate([YourDateField])

"Thek" wrote:

> In my Access Database, I have a date in a field with Data Type Number(Long
> Integer) in Access. I need a function to convert this Long Integer to a
> regular Date Format (mm/dd/ccyy)

 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      17th Feb 2006
"Thek" <(E-Mail Removed)> wrote in message
news:EC064631-B91A-443B-91F0-(E-Mail Removed)
> In my Access Database, I have a date in a field with Data Type
> Number(Long Integer) in Access. I need a function to convert this
> Long Integer to a regular Date Format (mm/dd/ccyy)


How is the data represented in the Long Integer field? If it's in
mmddyyyy format (e.g., today as 02172006), then you could use an
expression like this:

CDate(Format([YourField], "00/00/0000"))

For example, in the Immediate Window:

?CDate(Format(02172006, "00/00/0000"))
2/17/2006

If your date is represented as yyyymmdd, then use

CDate(Format([YourField], "0000/00/00"))

For example:

?CDate(Format(20060217, "0000/00/00"))
2/17/2006

This may be dependent on your regional date format, as defined in
Control Panel. I'm not sure, but you can test to find out easily
enough.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
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
Why can't I convert Long date format to Short date Jason Microsoft Excel Misc 1 22nd Jan 2010 10:24 PM
Convert long integer color value to RGB Dale Fye Microsoft Powerpoint 3 13th Mar 2008 12:08 AM
Convert long integer to time format Lawlee Microsoft Access 5 13th Oct 2005 12:53 PM
How to convert a long integer number to time format Lawlee Microsoft Access External Data 2 13th Oct 2005 10:09 AM
what is the long integer stored in the .Picture property? bdcrisp Microsoft Excel Misc 1 4th Jan 2004 02:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:44 AM.