PC Review


Reply
Thread Tools Rate Thread

Converting Now() to pure date

 
 
Domac
Guest
Posts: n/a
 
      21st Jun 2006
Hi,

What is the best way to convert return value of Now() function to pure Date
(21.062006. 15:30 => 21.06.2006.)??


Thanks!
Domagoj


 
Reply With Quote
 
 
 
 
SusanV
Guest
Posts: n/a
 
      21st Jun 2006
Format(Now(),dd.mm.yyyy)

--
hth,
SusanV


"Domac" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> What is the best way to convert return value of Now() function to pure
> Date (21.062006. 15:30 => 21.06.2006.)??
>
>
> Thanks!
> Domagoj
>



 
Reply With Quote
 
'69 Camaro
Guest
Posts: n/a
 
      21st Jun 2006
Hi, Domac.

> What is the best way to convert return value of Now() function to pure
> Date


Instead of converting the value returned from the Now( ) function, you'd use
the Date( ) function in your code. However, if you want to convert a
Date/Time value that has already been stored in the table by using the
Now( ) function, then use the DateValue( ) function. For example:

SELECT IIF(ISNULL(SomeDate), NULL, DateValue(SomeDate)) AS TheDate
FROM tblStuff;

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.


"Domac" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> What is the best way to convert return value of Now() function to pure
> Date (21.062006. 15:30 => 21.06.2006.)??
>
>
> Thanks!
> Domagoj
>



 
Reply With Quote
 
=?Utf-8?B?TGluYw==?=
Guest
Posts: n/a
 
      21st Jun 2006
I usually use Int(Now). Using Int() truncates the date to just date, no time
stamp.


"Domac" wrote:

> Hi,
>
> What is the best way to convert return value of Now() function to pure Date
> (21.062006. 15:30 => 21.06.2006.)??
>
>
> Thanks!
> Domagoj
>
>
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      21st Jun 2006
DateValue is preferred to Int (Int doesn't work properly for dates prior to
30 Dec, 1899)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Linc" <(E-Mail Removed)> wrote in message
news:7776AFC9-A338-403F-9716-(E-Mail Removed)...
>I usually use Int(Now). Using Int() truncates the date to just date, no
>time
> stamp.
>
>
> "Domac" wrote:
>
>> Hi,
>>
>> What is the best way to convert return value of Now() function to pure
>> Date
>> (21.062006. 15:30 => 21.06.2006.)??
>>
>>
>> Thanks!
>> Domagoj
>>
>>
>>



 
Reply With Quote
 
aaron.kempf@gmail.com
Guest
Posts: n/a
 
      21st Jun 2006
converting to an INT will ROUND UP won't it?

converting 1/26/2006 12:40pm to a decimail and you've got 3244.546
this rounds UP.

>From what I understand; you need to subtract .5 from a date and then

convert to an int in order to get the correct date.

-Aaron


Linc wrote:
> I usually use Int(Now). Using Int() truncates the date to just date, no time
> stamp.
>
>
> "Domac" wrote:
>
> > Hi,
> >
> > What is the best way to convert return value of Now() function to pure Date
> > (21.062006. 15:30 => 21.06.2006.)??
> >
> >
> > Thanks!
> > Domagoj
> >
> >
> >


 
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
Converting a text date to normal date in a query Duncs Microsoft Access 7 30th Sep 2008 06:43 PM
storing pure dates and pure times John A Grandy Microsoft C# .NET 4 16th Sep 2008 10:59 PM
Converting a date to a text field w/o converting it to a julian da LynnMinn Microsoft Excel Worksheet Functions 2 6th Mar 2008 03:43 PM
managed type Mixed (/clr) or Pure (/clr:pure) Bart Microsoft VC .NET 5 24th Oct 2006 03:14 PM
Repost - Converting from pure mode to mixed mode Dll Edward Diener Microsoft VC .NET 9 22nd Jan 2004 12:39 PM


Features
 

Advertising
 

Newsgroups
 


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