I know I could write one, but is there a built-in VBScript/ASP function to
take a date, which is in the format mm/dd/yyyy, and put it in a yymmdd
format? 15 2212
No, vbscript doesn't have a function for everything like that pansy php
language. :]
Function BetterDate()
Dim sDate
sDate = Date
BetterDate = Right(Year(sDate), 2) & Right("0" & Month(sDate), 2) &
Right("0" & Day(sDate), 2)
End Function
Response.Write BetterDate
You may want to conder yyyy over yy though.
Ray at home
"middletree" <mi********@htomail.com> wrote in message
news:eh**************@tk2msftngp13.phx.gbl... I know I could write one, but is there a built-in VBScript/ASP function to take a date, which is in the format mm/dd/yyyy, and put it in a yymmdd format?
thanks!
Gotta have the yy, because the boss has a special request.
"Ray at <%=sLocation%>" <myFirstNameATlane34dotKOMM> wrote in message
news:OW**************@tk2msftngp13.phx.gbl... No, vbscript doesn't have a function for everything like that pansy php language. :]
Function BetterDate() Dim sDate sDate = Date BetterDate = Right(Year(sDate), 2) & Right("0" & Month(sDate), 2) & Right("0" & Day(sDate), 2) End Function
Response.Write BetterDate
You may want to conder yyyy over yy though.
Ray at home
"middletree" <mi********@htomail.com> wrote in message news:eh**************@tk2msftngp13.phx.gbl... I know I could write one, but is there a built-in VBScript/ASP function
to take a date, which is in the format mm/dd/yyyy, and put it in a yymmdd format?
> Gotta have the yy, because the boss has a special request.
Tell the boss the stone age is over. It's time to remember the mentality
that caused the Y2K problem in the first place, and a similar mentality that
gives people fits trying to figure out if 03/04/02 is March 4, 2002, or
April 3, 2002, or April 2, 2003, or Feb. 4, 2003.
Foo Man Chew wrote: Gotta have the yy, because the boss has a special request.
Tell the boss the stone age is over. It's time to remember the mentality that caused the Y2K problem in the first place, and a similar mentality that gives people fits trying to figure out if 03/04/02 is March 4, 2002, or April 3, 2002, or April 2, 2003, or Feb. 4, 2003.
Ease up will ya? He did not say he wanted to store the dates this way,
merely display them (I think). It's not as if it was even possible to store
them with this format (unless the mistake of using a text field to store
them was being made.)
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
If you are getting the date from an Access DB you could format it in the
query..
SELECT FORMAT(event_date,'mm/dd/yy') AS EventDate etc, etc...
Bob Lehmann
"middletree" <mi********@htomail.com> wrote in message
news:eh**************@tk2msftngp13.phx.gbl... I know I could write one, but is there a built-in VBScript/ASP function to take a date, which is in the format mm/dd/yyyy, and put it in a yymmdd format?
Good night, but you're presumptive and rude!
If you must know, I am creating folders, based on which date some support
files were sent, I have been asked to put files into folders with a format
of yymmdd, so if I wanted to see the trace files that were sent in regards
to Ticket 1001, on Dec 24, I'd just go to \\servername\tickets\1001\0312124
"Foo Man Chew" <fo*@man.chew> wrote in message
news:ut**************@tk2msftngp13.phx.gbl... Gotta have the yy, because the boss has a special request. Tell the boss the stone age is over. It's time to remember the mentality that caused the Y2K problem in the first place, and a similar mentality
that gives people fits trying to figure out if 03/04/02 is March 4, 2002, or April 3, 2002, or April 2, 2003, or Feb. 4, 2003.
And for the record, our company makes software used for deposits and
withdrawals in 15 of the 30 largest banks in the world, so you can be sure
that we have a handle on the Y2K issue.
"Foo Man Chew" <fo*@man.chew> wrote in message
news:ut**************@tk2msftngp13.phx.gbl... Gotta have the yy, because the boss has a special request. Tell the boss the stone age is over. It's time to remember the mentality that caused the Y2K problem in the first place, and a similar mentality
that gives people fits trying to figure out if 03/04/02 is March 4, 2002, or April 3, 2002, or April 2, 2003, or Feb. 4, 2003.
> Ease up will ya? He did not say he wanted to store the dates this way, merely display them (I think). It's not as if it was even possible to
store them with this format
Obviously not. Of course, my problem with the confusion caused by
non-standard date formats has nothing to do with storage, but rather with
interpretation (both in passing them to and from a database, between
software, etc., and display to humans).
> of yymmdd, so if I wanted to see the trace files that were sent in regards to Ticket 1001, on Dec 24, I'd just go to
\\servername\tickets\1001\0312124
And what's wrong with this:
\\servername\tickets\1001\20031224\
....other than it's much more clear to *anyone* (not just the author of the
software) what the date actually is.
> And for the record, our company makes software used for deposits and withdrawals in 15 of the 30 largest banks in the world, so you can be sure that we have a handle on the Y2K issue.
Save it. I was making an analogy, not accusing you of being dumb about Y2K.
Don't tell me what to save.
And saying that my boss is in the stone age IS an accusation of being dumb.
"Foo Man Chew" <fo*@man.chew> wrote in message
news:ea**************@tk2msftngp13.phx.gbl... And for the record, our company makes software used for deposits and withdrawals in 15 of the 30 largest banks in the world, so you can be
sure that we have a handle on the Y2K issue. Save it. I was making an analogy, not accusing you of being dumb about
Y2K.
I asked a question about how to do something. Any comments or info you can
share which will help me are not. The kind of comments you did offer are
not. It is not for you to decide how I should name our folders.
"Foo Man Chew" <fo*@man.chew> wrote in message
news:#t*************@tk2msftngp13.phx.gbl... of yymmdd, so if I wanted to see the trace files that were sent in
regards to Ticket 1001, on Dec 24, I'd just go to \\servername\tickets\1001\0312124
And what's wrong with this:
\\servername\tickets\1001\20031224\
...other than it's much more clear to *anyone* (not just the author of the software) what the date actually is.
Of course, I meant to say that informational comments are welcome, not "not"
"middletree" <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP09.phx.gbl... I asked a question about how to do something. Any comments or info you
can share which will help me are not. The kind of comments you did offer are not. It is not for you to decide how I should name our folders.
"Foo Man Chew" <fo*@man.chew> wrote in message news:#t*************@tk2msftngp13.phx.gbl... of yymmdd, so if I wanted to see the trace files that were sent in regards to Ticket 1001, on Dec 24, I'd just go to \\servername\tickets\1001\0312124
And what's wrong with this:
\\servername\tickets\1001\20031224\
...other than it's much more clear to *anyone* (not just the author of
the software) what the date actually is.
> I asked a question about how to do something.
And I'm just trying to understand the advantage of using 2-digit years. You
have shown me nothing substantial, so I'll assume you don't have a good
reason.
middletree wrote: I asked a question about how to do something. Any comments or info you can share which will help me are not. The kind of comments you did offer are not. It is not for you to decide how I should name our folders.
Drop it middletree. You may as well get used to it now. There is no way to
control the behavior of others in newsgroups. By posting a question here,
you are going to get a great assortment of response, some of which you may
not like. Deal with it. It is the nature of the medium. People are free to
reply in whatever manner they deem fit, and they are free to offer
unsolicited advice. And not only are they free to do so, they WILL do so.
Moreover, you should welcome it. If we were somehow restricted to only
providing the answers to the questions being asked, without adding extra
advice about things that we perceive to be problem areas, I do not think we
would be of as much help as I like to think we are.
Bob
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM" This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Martin Lucas-Smith |
last post by:
I have a string saved in the format produced by date ('Ymd-Hms')
e.g.
20050215-130257
Can anyone suggest the easiest way to present this as e.g.
13.02pm, 15/Feb/2005
|
by: martini |
last post by:
Need help:
I am trying to call a DB2 stored procedure that requires parameters: 4x int,
date, varchar, int. I use VB6 & oledb.
I'm using statements:
cmd.CommandText = "{call db2admin.proc(1, 0,...
|
by: Kerri |
last post by:
Hi,
I have an ASPX page with a textbox where the user enters a
date.
I have a variable of tyope date that I populate from teh
form
d
dtMyDate = Request.Form("txMyDate")
|
by: Thomas Beyerlein |
last post by:
I am binding dates to a textbox, the date is stored in SQL in a datetime
field. When it gets bound it turns it into a long date (Sunday, Dec. 25
2005), in SQL when viewing the table it views as a...
|
by: johndcal |
last post by:
Hello All,
I have a date value that I pull from a .csv file.
After reading the file and storing the values in an array the value of
the date could
be found in $array, for example....
|
by: Middletree |
last post by:
I am trying to display dates in a spreadsheet, but the dates need to be in a
format that will allow them to be sorted in Excel. The datatype in the SQL
Server database is datetime. In this case, I...
|
by: Tormod |
last post by:
I'm having problems formatting a date retrieved from mysql database. When I retrieve the date it's in the format YYYY-MM-DD. I need to split the Day, Month and Year portions of the date up so that I...
|
by: Lars Hylleberg |
last post by:
In my company we are runing java Webshere applications on Windows platform and connecting to DB2 V8 on z/OS mainframe. Until now we have used the type 2 JDBC driver, which are using the DB2 Connect...
|
by: Shawn29316 |
last post by:
Hi,
I've used a form to capture the requesters date range specifications for a set of queries forever and never cared that it took the short date entered by the requester and changed it to a...
|
by: WebCM |
last post by:
There is a function: http://paste.ubuntu.com/21865
It needs GMT date in YYYY-MM-DD HH:MM:SS format - in SQL: datetime. If date is the same as today, the function returns "Today". There
is one...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
| |