Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Date re-format

I need to append the current date-time into a string
without slashes ("/") or dots ("."), to use as a
filename. I have passed the Date function to a variable,
but can't easily convert the format without parsing the
string to remove the slashes. Is there an easy way to
convert it to the native numeric format Excel uses
internally (that would work fine, I just need a date
string to differentiate filenames), or any otehr format
that would work in a filename? There must be an
easier/faster way than parsing this.

thanks

kpd
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Date re-format

Kevin,

Try something like

sFileDate = Format(Date,"yyyymmdd")

and append that to the filename before saving

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Kevin" wrote in message
...
I need to append the current date-time into a string
without slashes ("/") or dots ("."), to use as a
filename. I have passed the Date function to a variable,
but can't easily convert the format without parsing the
string to remove the slashes. Is there an easy way to
convert it to the native numeric format Excel uses
internally (that would work fine, I just need a date
string to differentiate filenames), or any otehr format
that would work in a filename? There must be an
easier/faster way than parsing this.

thanks

kpd



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
permanent conversion of 1904 date format to 1900 date format Jos Excel Worksheet Functions 4 November 26th 15 02:48 PM
How do I convert dd/mm/yy date format to yyddd Julian date format itzy bitzy[_2_] Excel Worksheet Functions 8 December 11th 09 03:20 AM
convert serial date format to normal date format Flagworld Excel Discussion (Misc queries) 3 September 23rd 08 01:32 PM
Excel 2000 date format cannot be set to Australian date format Brian Jones Excel Discussion (Misc queries) 1 March 30th 05 06:03 AM
Change a date in text format xx.xx.20xx to a recognised date format concatenator Excel Programming 1 November 24th 03 11:33 PM


All times are GMT +1. The time now is 04:33 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"