Ask a Question related to ASP Database, Design and Development.
-
Stephen Cairns #1
Change Date Format
I have a date being entered into a textbox in a dd/mm/yy format, however I need to be able to change this format to a yyyy/mm/dd in order to pass the date into a stored procedure and run some asp code. Does anyone know how to do this date format change in the background say on the onclick event of a button
Stephen Cairns Guest
-
date format change from YYYYMMDD?
We are in the process of migrating our database server over to a new system. The old system has Coldfusion 4.5, Win2k Server and MS SQL 2000. We're... -
Format a date
My database stores the date as mm/dd/yyyy How can I return this in the format of say: Tuesday- December 21, 2005 -
Date format change not working
Im trying to change the date format entered into a textbox from dd/mm/yy to yyyy/mm/dd so as my stored procedure is run correclty. The date is... -
converting date into database date format(newbie)
Hi! U can convert "8-Aug-03" into mysql date which requires yyyy-mm-dd format as below. <?php date("Y-m-d",strtotime("8-Aug-03")); ?> -
Nautulus: time/date format change ?
I run RH9 with Gnome / Nautilus. I am irritated by the time/date format in Nautilus. like : " Wednesday, July 9 2003 at 10:44:14 PM " ! Does... -
Bob Barrows #2
Re: Change Date Format
Stephen Cairns wrote:
[url]http://www.aspfaq.com/show.asp?id=2313[/url] vbscript> I have a date being entered into a textbox in a dd/mm/yy format,
> however I need to be able to change this format to a yyyy/mm/dd in
> order to pass the date into a stored procedure and run some asp code.
> Does anyone know how to do this date format change in the background
> say on the onclick event of a button
[url]http://www.aspfaq.com/show.asp?id=2040[/url] help with dates
[url]http://www.aspfaq.com/show.asp?id=2260[/url] dd/mm/yyy confusion
HTH,
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"
Bob Barrows Guest
-
CJM #3
Re: Change Date Format
Function ISODate(ByVal strDate)
Dim strFormat
strFormat = "%Y-%M-%D"
' Insert Padded Day of Month
strFormat = Replace(strFormat, "%D", Right("0" & DatePart("d", strDate),
2), 1, -1, vbBinaryCompare)
' Insert Padded Month Numbers
strFormat = Replace(strFormat, "%M", Right("0" & DatePart("m", strDate),
2), 1, -1, vbBinaryCompare)
' Insert Long Year (4 digit)
strFormat = Replace(strFormat, "%Y", DatePart("yyyy",strDate), 1, -1,
vbBinaryCompare)
ISODate = strFormat
End Function
Chris
"Stephen Cairns" <S.Cairns@belfasttelegraph.co.uk> wrote in message
news:C17D0C30-1BBE-446A-8A9E-D36FF73AB76E@microsoft.com...need to be able to change this format to a yyyy/mm/dd in order to pass the> I have a date being entered into a textbox in a dd/mm/yy format, however I
date into a stored procedure and run some asp code. Does anyone know how to
do this date format change in the background say on the onclick event of a
button
CJM Guest
-
Aaron Bertrand [MVP] #4
Re: Change Date Format
>> yyyy/mm/dd in order to pass the date into a stored procedure
The only safe date-only format to pass to SQL Server is YYYYMMDD. Any other
format is vulnerable to ambiguous interpretation.
Aaron Bertrand [MVP] Guest



Reply With Quote

