PC Review


Reply
Thread Tools Rate Thread

Date/Time in Number Format

 
 
=?Utf-8?B?SmF5?=
Guest
Posts: n/a
 
      22nd Jun 2006
Thanks in advance.

A query named Qry_Time_Table has fields such as Date, Start-Time...
But these are numbers representing dates and times.
Below are examples.
(Ex) Date Start_Time
38889 56001690

(What I want to achieve)
Date Start_Time
6/21/06 6/21/06 09:30:00

How can I change these numbers into Date/Time format in calculated fields of
the query or vice versa?

 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      22nd Jun 2006
On Wed, 21 Jun 2006 18:54:02 -0700, Jay
<(E-Mail Removed)> wrote:

>Thanks in advance.
>
>A query named Qry_Time_Table has fields such as Date, Start-Time...
>But these are numbers representing dates and times.
>Below are examples.
>(Ex) Date Start_Time
> 38889 56001690
>
>(What I want to achieve)
> Date Start_Time
> 6/21/06 6/21/06 09:30:00
>
>How can I change these numbers into Date/Time format in calculated fields of
>the query or vice versa?


Is this an Access table, or some external table? What are the
datatypes of these two fields?

Access Date/Time values are stored as Double Float numbers, a count of
days and fractions of a day since midnight, December 30, 1899. 6/21/06
is in fact 38889, as you can determine using the CDate() function:

?cdate(38889)
6/21/2006

but I can't see the logic of your Start_time value:

?cdbl(#6/21/06 09:30:00#)
38889.3958333333

Aha... maybe it's a long integer count of minutes:

?DateAdd("n", -56001690, #6/21/06 09:30:00#)
12/29/1899 8:00:00 AM

though what the 16 hours differance means is beyond me!

John W. Vinson[MVP]
 
Reply With Quote
 
strive4peace
Guest
Posts: n/a
 
      25th Jun 2006
Hi Jay,

turn on the display of the Properties window

(right-click anywhere and choose "Properties" from the
shortcut menu)

click in your column name

set the Format property -- m/d/yy hh:nn:ss
and press ENTER

this will show you a time based on a 24-hour clock

when you say this is what you want to archive... a format
is a way of looking at something; it does not change what is
stored -- you can change the format property of your
archive table too.

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day

remote programming and training
strive4peace2006 at yahoo.com

*

Jay wrote:
> Thanks in advance.
>
> A query named Qry_Time_Table has fields such as Date, Start-Time...
> But these are numbers representing dates and times.
> Below are examples.
> (Ex) Date Start_Time
> 38889 56001690
>
> (What I want to achieve)
> Date Start_Time
> 6/21/06 6/21/06 09:30:00
>
> How can I change these numbers into Date/Time format in calculated fields of
> the query or vice versa?
>

 
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
using current date and time format as serial number tia sal22 ratullloch_delthis Microsoft C# .NET 1 4th Dec 2010 01:09 AM
Re: using current date and time format as serial number tia sal22 ratullloch_delthis Microsoft C# .NET 0 3rd Dec 2010 10:03 PM
Converting text format of time/date into Excel time/date for subtr YY san. Microsoft Excel Worksheet Functions 5 25th Feb 2010 07:13 AM
Convert date + time text format to date format =?Utf-8?B?UGF1bCBIbw==?= Microsoft Excel Worksheet Functions 2 22nd May 2007 05:47 PM
Have excel export cell format other than text; need time and date not number value ogibogi@gmail.com Microsoft Excel Discussion 0 4th Aug 2006 06:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:46 AM.