473,473 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

double figure of day and month

Hi,

I am going to use the date as my filename. How can I convert date()
["5/18/04"] to "20040518"? Thanks a thousand.

--
Andrew


Jul 19 '05 #1
2 1262
<%
filename = year(date) & _
right("00" & month(date), 2) & _
right("00" & day(date), 2)

response.write filename
%>

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Andrew" <du******@yahoo.com> wrote in message
news:iE*******************@twister01.bloor.is.net. cable.rogers.com...
Hi,

I am going to use the date as my filename. How can I convert date()
["5/18/04"] to "20040518"? Thanks a thousand.

--
Andrew

Jul 19 '05 #2
Thank you very much.

--
Andrew

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:ul**************@tk2msftngp13.phx.gbl...
<%
filename = year(date) & _
right("00" & month(date), 2) & _
right("00" & day(date), 2)

response.write filename
%>

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Andrew" <du******@yahoo.com> wrote in message
news:iE*******************@twister01.bloor.is.net. cable.rogers.com...
Hi,

I am going to use the date as my filename. How can I convert date()
["5/18/04"] to "20040518"? Thanks a thousand.

--
Andrew


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sugapablo | last post by:
My brain is frozen on a convenient way to figure out if today is the 1st, 2nd, 3rd, 4th, or last Thursday of the month. Basically I need something that will figure this out for any given day for...
3
by: msnews.microsoft.com | last post by:
Hey Guys, I was wondering if any of you could help me out with converting a single digit (ie: 1, 2, 3, etc) to double digits (ie: 01, 02, 03, etc). I am trying to convert the date in...
1
by: Thomas Matthews | last post by:
Hi, I'm looking for an efficient method to deep copy containers of fields. A Field is a parent class with children such as Integer_Field, String_Field, and Date_Field, etc. The algorithm /...
16
by: jhwagner | last post by:
I need to use double data entry with an MS Access database. I have read many arguments and reasons against this on this group but I have to do this. I have seen various tips on how this can be...
3
by: slylos | last post by:
I've got a section of code in my app that keeps track of how much time an employee has accrued, which equals out to 1.33 days of PTO per month. I'm trying to store the time accrued so far in an...
10
by: Bill | last post by:
Hello -- I'm parsing the output of the finger command, and was wondering something...If I'm given a month abbrievation (such as "Jan"), what's the best way to figure out the month number? I see...
1
by: Leonnhy | last post by:
HI, I'm a beginner in using MS Access. What's the code for the bring forward figure in current sales report I create as follows:- Once I click on the sales report, it will show me the date range...
11
by: Ole Nielsby | last post by:
First, sorry if this is off-topic, not strictly being a C++ issue. I could not find a ng on numerics or serialization and I figure this ng is the closest I can get. Now the question: I want...
4
by: Poldie | last post by:
I'm using Visual Studio 2005 SP1 on a Win2K SP4 system. VS is set up to use "web development settings ". I use VB. If I create a new web application project, then close the project and exit VS...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.