Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Put only date (not time too) in variable from FileDateTime function


What would be the syntx for the variable, dtFileDate to contain only the
date (not the time) from the FileDateTime function? For example put
1/21/2006 in the variable dtFileDate when FileDateTime is 1/21/2006
11:57:16 AM?

In other words, from:
dtFileDate = FileDateTime("C:\USR\MIKE\AT0158.MB")

I need dtFileDate to contain only the date 1/21/2006 (not the time
11:57:16 AM, too).

Thanks so very much. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=503681

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Put only date (not time too) in variable from FileDateTime function

dtFileDate = Int(FileDateTime("C:\USR\MIKE\AT0158.MB"))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"mikeburg" wrote in
message ...

What would be the syntx for the variable, dtFileDate to contain only the
date (not the time) from the FileDateTime function? For example put
1/21/2006 in the variable dtFileDate when FileDateTime is 1/21/2006
11:57:16 AM?

In other words, from:
dtFileDate = FileDateTime("C:\USR\MIKE\AT0158.MB")

I need dtFileDate to contain only the date 1/21/2006 (not the time
11:57:16 AM, too).

Thanks so very much. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile:

http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=503681



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Put only date (not time too) in variable from FileDateTime function

i've always just used format

Format(FileDateTime("C:\USR\MIKE\AT0158.MB"), "mm/dd/yy")

--


Gary


"mikeburg" wrote in
message ...

What would be the syntx for the variable, dtFileDate to contain only the
date (not the time) from the FileDateTime function? For example put
1/21/2006 in the variable dtFileDate when FileDateTime is 1/21/2006
11:57:16 AM?

In other words, from:
dtFileDate = FileDateTime("C:\USR\MIKE\AT0158.MB")

I need dtFileDate to contain only the date 1/21/2006 (not the time
11:57:16 AM, too).

Thanks so very much. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile:
http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=503681



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Put only date (not time too) in variable from FileDateTime function


Thanks again, guys. If it were not for y'all, people like me would
probably give up trying to learn VBA. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=503681

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
variable date in XIRR function possible? mstroop Excel Discussion (Misc queries) 0 June 16th 06 03:53 PM
Date/Time Function systemx Excel Worksheet Functions 1 December 6th 05 08:28 AM
FileDateTime for Internet web page Mogwai Excel Programming 5 June 2nd 05 09:03 PM
Date & Time function Tracy Excel Worksheet Functions 2 November 6th 04 12:48 AM
A VBA function to give serial date for date and time? Android[_2_] Excel Programming 6 July 8th 04 03:55 PM


All times are GMT +1. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"