Dan Nelson wrote:
In the last episode (Sep 14), John Meyer said:
I'm pulling in a date with the following format
9/14/2009 2:12:48 PM
And using this mask to convert it using the str_to_date() function:
%e %m %Y %r
but it keeps giving me an error. Do I have the right mask?
Nope. Assu
In the last episode (Sep 14), John Meyer said:
> I'm pulling in a date with the following format
> 9/14/2009 2:12:48 PM
> And using this mask to convert it using the str_to_date() function:
> %e %m %Y %r
>
> but it keeps giving me an error. Do I have the right mask?
Nope. Assuming your input st
I'm pulling in a date with the following format
9/14/2009 2:12:48 PM
And using this mask to convert it using the str_to_date() function:
%e %m %Y %r
but it keeps giving me an error. Do I have the right mask?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubs
Assign all dates to have a day of 01
Store in a date field, use DATE_FORMAT to just extract the MM and .
As you don't have the real day information it doesn't matter what day is used,
so long as it present in all months.
Hope this helps
Robert Gehrig
Webmaster at www.gdbarri.com
e-mail: [
Olaf Stein wrote:
Thanks...
My issue is not storage, it is confidentiality.
I am not allowed to store the day of birth as it is considered identifying
information (in medical records).
I do not even have the day, I want to pass a date in format (-MM) to a
date field if possible.
Pass the
Thanks...
My issue is not storage, it is confidentiality.
I am not allowed to store the day of birth as it is considered identifying
information (in medical records).
I do not even have the day, I want to pass a date in format (-MM) to a
date field if possible.
On 1/15/07 11:37 AM, "Chris Wh
Is it possible in mysql to create a date field that stores year and month
only (-MM) without having to zero out the day or use varchar type fields
Best here is to just use a DATE field, then use DATE_FORMAT when you
want to pull up the customized date. It will get stored as a timestamp
(i
Hi All
Is it possible in mysql to create a date field that stores year and month
only (-MM) without having to zero out the day or use varchar type fields
Thanks
Olaf
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EM
Ananda Kumar wrote:
Hi Friends,
I want to set the default date format as dd-mon-. How do i do this in
mysql.
The short answer: not.
http://dev.mysql.com/doc/refman/5.0/en/dynamic-system-variables.html
lists the variables you can change by the SET GLOBAL or SET SESSION
command
Hi Friends,
I want to set the default date format as dd-mon-. How do i do this in
mysql.
I tried this, set global date_format='%d-%m-%y';. The command executed and
when i did "show variable" it show the new format.
But when i tried the below test, i got wrong results. Can u
Dan Nelson wrote:
>>Is there a way to specify the Date Format for an INSERT statement?
>>
>>Something like:
>>
>> INSERT INTO tblMyTable(myDate) VALUES(DATE_FORMAT('USA', '12-31-2004');
>>
>>
>
>Try the STR_TO_DATE fu
;, which I've never
seen before :)
> Is there a way to specify the Date Format for an INSERT statement?
>
> Something like:
>
> INSERT INTO tblMyTable(myDate) VALUES(DATE_FORMAT('USA', '12-31-2004');
Try the STR_TO_DATE function:
SELECT STR_TO_DATE(
I have some data where the date is already in USA format (MM-DD-).
I would like to be able to insert this data without having to massage
the date in the code.
Is there a way to specify the Date Format for an INSERT statement?
Something like:
INSERT INTO tblMyTable(myDate) VALUES
ld -v --help | grep date_format
--date_format=name The DATE format (For future).
date_format (No default value)
[/shell]
This has been said before, but date_format is not implemented on the
server. You can set it, but I don't think it does anything.
>
> J.R.
&g
AIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 24, 2005 10:57 AM
To: Mark Mchugh
Cc: mysql list
Subject: Re: changing default date format on server
Mark Mchugh <[EMAIL PROTECTED]> wrote on 03/24/2005 10:26:44 AM:
> hi,
> How can i change the default date field to european f
Hello.
This is a frequently asked question. For example read these threads:
http://lists.mysql.com/mysql/175324
http://lists.mysql.com/mysql/177730
Shuan <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> How to change the Default Date/DateTime Format of MySQL server?
> I'm us
Dear all,
How to change the Default Date/DateTime Format of MySQL server?
I'm using MySQL 4.1.10-nt on WinXP Pro.
Thanks.
Shuan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
e date_format,
> datetime_format and time_format in SHOW VARIABLES, it's even
> documented somewhere (e.g. http://mysqld.active-venture.com/SET_OPTION.html )
> but it seems it doesn't do anything in MySQL 4.1.7.
`mysqld.exe --help --verbose | grep _format` says:
--date_fo
Hello!
Is there a way how to change the date and time format accepted and
returned by MySQL from '-mm-dd' to something different? I've seen
several posts here telling it's impossible but they are quite old. Is
it still true in recent MySQL versions? I can see date_format,
datetime_format and t
>
> > Hi there,
> >
> > I am having trouble converting a timestamp from mySQL to the US Format
> > mm/dd/. Can someone please help. I am also having trouble
> > converting -mm-dd into a normal mm/dd/ format as well.
A bit off-topic but,
if you are able to use Perl anytime during
Gary:
Am I looking at PHP's "date()" function? You are taking a timestamp
from a MySQL table and wanting to convert it into a US format. Is the
timestamp stored in your MySQL table a Unix timestamp or a MySQL
timestamp?
It's important to note that you can't take a MySQL timestamp and use
PHP's
Gary Mack wrote:
Hi there,
I am having trouble converting a timestamp from mySQL to the US Format mm/dd/. Can someone please help. I am also having trouble converting -mm-dd into a normal mm/dd/ format as well.
Normal format *is* -mm-dd.
I am using the following line of code:
d
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Monday 05 July 2004 06:07 pm, Gary Mack wrote:
> Hi there,
>
> I am having trouble converting a timestamp from mySQL to the US Format
> mm/dd/. Can someone please help. I am also having trouble converting
> -mm-dd into a normal mm/dd/
Hi there,
I am having trouble converting a timestamp from mySQL to the US Format mm/dd/.
Can someone please help. I am also having trouble converting -mm-dd into a normal
mm/dd/ format as well.
I am using the following line of code:
date('m/d/Y', $row10['modified']);
$row10[
"Matt Tucker" <[EMAIL PROTECTED]> wrote:
> I'm moving a JavaServlet app over from Tomcat on Win2K with a MS SQL 7 DB to Tomcat
> on Red
> Hat Linux with mySQL. Of course, there's about a hundred queries that use dates and
> of
> course, they're all in the format mm-dd-. is there a way to form
Hi,
I'm moving a JavaServlet app over from Tomcat on Win2K with a MS SQL 7 DB to Tomcat on
Red Hat Linux with mySQL. Of course, there's about a hundred queries that use dates
and of course, they're all in the format mm-dd-. is there a way to format the date
column in my mysql tables to acce
"David Carlos Brunstein" <[EMAIL PROTECTED]> wrote:
> Hi Egor.
>
> Thanks for your answer. I'm relatively new to MySQL.
>
> Isn't any way -like an environment variable or configuration file
> setting or something like that- to change the date fo
Hi Egor.
Thanks for your answer. I'm relatively new to MySQL.
Isn't any way -like an environment variable or configuration file
setting or something like that- to change the date format at the MySQL
side, not at client side ?
Regards,
David.
==
David Carlos
"David Carlos Brunstein" <[EMAIL PROTECTED]> wrote:
>
> By these days I'm facing a system DB migration to MySQL (the last
> production version) and I have the followin problem. All the SELECTs
> sentences are all over the application, and for date/datetime filters
> are using the dd/mm/ format
Hi,
I'm new to the list.
By these days I'm facing a system DB migration to MySQL (the last
production version) and I have the followin problem. All the SELECTs
sentences are all over the application, and for date/datetime filters
are using the dd/mm/ format in the WHERE clause. Is the same i
4.0.17.
- Original Message -
From: "Trevor Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 26, 2004 12:56 PM
Subject: yearweek() result back to date format?
> How can I use the output string of the yearweek() function
> (for example,
How can I use the output string of the yearweek() function
(for example, "200346" below):
mysql> select dayname("2003-11-12"), yearweek("2003-11-12");
+---++
| dayname("2003-11-12") | yearweek("2003-11-12") |
+---+---
- Original Message -
From: "Victoria Reznichenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 16, 2003 11:48 AM
Subject: Re: Can I change the date format...
> Karam Chand <[EMAIL PROTECTED]> wrote:
> > Is there any
Karam Chand <[EMAIL PROTECTED]> wrote:
> Is there anyway to change the default date format
> (possibly in a .ini or .cfg file) from -MM-DD to
> another format ? (ie, mm/dd/ or any user-defined
> format).
No, You can't.
>
> The useage that I'm looking a
Hello
Is there anyway to change the default date format
(possibly in a .ini or .cfg file) from -MM-DD to
another format ? (ie, mm/dd/ or any user-defined
format).
The useage that I'm looking at is to import a CSV file
into a table (using Load data infile command)
where date
probably one of the many replys you'll get on this, but
ORDER BY month(start_date)
assuming the column that has the date is start_date
On Thursday 10 July 2003 14:51, Mike At Spy wrote:
> I am trying to create an order by in a select statement that takes a
> standard 'date' column in a table an
Try:
order by left(start_date,7)
That will order by year then month for a standard date column..
Cheers,
Andrew
-Original Message-
From: Mike At Spy [mailto:[EMAIL PROTECTED]
Sent: Thursday 10 July 2003 20:51
To: [EMAIL PROTECTED]
Subject: ORDER BY with Date Format
I am trying to
I am trying to create an order by in a select statement that takes a
standard 'date' column in a table and sorts the returned data by the month
of that date.
Off hand, I tried
ORDER BY start_date(m)
And I know that is wrong. Anyone have any suggestions?
Thanks,
-Mike
--
MySQL General Mai
On 1 Jul 2003 at 11:31, Fabio Bernardo wrote:
> select (current_date - 1 )
>
> and the result was:
>
> (Currentdate -1)
> ---
> 20030700
Use this instead:
SELECT CURRENT_DATE() - INTERVAL 1 DAY;
The documentation for DATE_ADD() and other date and time f
ect: date format
today´s date: 2003-07-01
Hi there,,,
I wrote down this statement
select (current_date - 1 )
and the result was:
(Currentdate -1)
---
20030700
when i write select (current_date )
I have:
(Currentdate)
---
2
today´s date: 2003-07-01
Hi there,,,
I wrote down this statement
select (current_date - 1 )
and the result was:
(Currentdate -1)
---
20030700
when i write select (current_date )
I have:
(Currentdate)
---
2003-07-01
but act
* Roger Baklund
[...]
> UPDATE a SET new_date =
>
(
> MID(my_date,7,4),'-',
> MID(my_date,1,2),'-',
> MID(my_date,4,2));
huh? How did this happen...? I just checked my outbox, and the message I wrote
yesterday[1] contained "new_date = CONCAT(". It seems as the substring "CON" has been
rep
* Wong Zach-CHZ013
[...]
> In table a, the columns are
> my_date - longtext
> num - int(11)
[...]
> Q:
> How do I convert 08/06/2002 to 2002-08-06 format
LONGTEXT is not a good column type for dates, you should use the special
'date' type, see http://www.mysql.com/doc/en/Column_types.html >.
To c
this command should get your data moved to a new sql table
insert into table2
select
(concat(mid(my_date,7,4),'-',mid(my_date,1,2),'-',mid(my_date,4,2)))
from table1;
- hcir
On Tuesday, January 28, 2003, at 01:45 PM, Wong Zach-CHZ013 wrote:
Hi
I have a few tables in a database Z, namely
table
Hi
I have a few tables in a database Z, namely
table
a
b
c
In table a, the columns are
my_date - longtext
num - int(11)
eg:
mysql> select * from a;
+--+--+--+
| my_date | x|
+--+--+
| 08/06/2002 |1 |
| 08/07/2002 |2 |
+--+--+--
At 12:39 -0400 9/20/02, Stanley, Jason wrote:
>hello all,
>
>i have the following selection in my query...
>DATE_FORMAT(Images.TIMESTAMP, '%a %b %d at %l:%i %p') as TIME
>
>now, i want to apply LCASE or LOWER to it, but i'm a little unsure
>how to handle the syntax with two sets of parentheses.
hello all,
i have the following selection in my query...
DATE_FORMAT(Images.TIMESTAMP, '%a %b %d at %l:%i %p') as TIME
now, i want to apply LCASE or LOWER to it, but i'm a little unsure how to handle the
syntax with two sets of parentheses.
any insight?
tia,
j
--
Hello,
> > I am developing an aplication where I need format the date for
> > inserting into mySQL.
>
> =what language is your application written in?
> =dn
The application is written in Java, but the problem is that the module
where the dates for the DB are managed is an open source framewor
Hello Javier,
> I am developing an aplication where I need format the date for inserting
> into mySQL.
=what language is your application written in?
=dn
> With DATE_FORMAT I can format the mySQL date to "my date", but I haven't
> found a good way to format "my date" to the mySQL date.
>
> My
Hello,
I am developing an aplication where I need format the date for inserting
into mySQL.
With DATE_FORMAT I can format the mySQL date to "my date", but I haven't
found a good way to format "my date" to the mySQL date.
My format is 'dd-mm-' and to convert it to '-mm-dd' I'm using
the
Em Ter 16 Jul 2002 18:19, Elby Vaz escreveu:
> Hi,
>
> the date format of MySql is /mm/dd (2002/07/16) right?
Wrong. The date format of MySQL is -mm-dd.
> How I do to insert the date typing in my form dd/mm/ (16/07/2002)?
> It is possible?
You have to format your
Hi,
the date format of MySql is /mm/dd (2002/07/16) right?
How I do to insert the date typing in my form dd/mm/ (16/07/2002)?
It is possible?
Thanks,
Elby
_
MSN Photos é a maneira mais fácil e prática de editar e
At 11:08 -0400 6/25/02, walt wrote:
>Does anyone know if version 4.0 will support formatted date queries.
>
>Example:
>select create_date from what_ever where create_date >
>date_format('03/01/2002','%m/%d/%Y')
Why not just write the date correctly? That is, what does
this gain you?
>
>
>sql, q
Does anyone know if version 4.0 will support formatted date queries.
Example:
select create_date from what_ever where create_date >
date_format('03/01/2002','%m/%d/%Y')
sql, query
--
Walter Anthony
System Administrator
National Electronic Attachment
Atlanta, Georgia
1-800-782-5150 ext. 1608
Chuck,
Friday, June 14, 2002, 3:01:58 AM, you wrote:
CPP> If you have mutli-date fields, can you set one date format in mysql sql
CPP> statement for all fields? I have 9 date fields, that like to have the same
CPP> format.
What do you mean one date format? MySQL stores data in certa
If you have mutli-date fields, can you set one date format in mysql sql
statement for all fields? I have 9 date fields, that like to have the same
format. Also I don't want it to work fields that have -00-, can I
tell not to show
Trevor,
Wednesday, May 29, 2002, 3:29:43 AM, you wrote:
TF> Running MYSQL 3.23 can the date mmdd be reversed when using Access or VB
TF> frontend so that users can enter it as they are used to eg. ddmm.
MySQL stores data in mmdd format, but you can use DATE_FORMAT()
function to displ
Running MYSQL 3.23 can the date mmdd be reversed when using Access or VB
frontend so that users can enter it as they are used to eg. ddmm. Also I
tried creating a new field for date using DATE(8) BUT the sql statement came
back with an error. I tried changing the format of the date field t
razvan,
Tuesday, March 05, 2002, 7:46:31 AM, you wrote:
r> Hi, please help me with this one!
r> I now the date_format function, it converts the standard format sql
r> (-mm-dd)
r> to any format, but my problem is that i want to convert from another format
r> (eg. dd/mm/) to the sta
razvan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 7:46 AM
Subject: date format
> Hi, please help me with this one!
> I now the date_format function, it converts the standard format sql
> (-mm-dd)
> to any format, but my problem is that
Hi, please help me with this one!
I now the date_format function, it converts the standard format sql
(-mm-dd)
to any format, but my problem is that i want to convert from another format
(eg. dd/mm/) to the standard format, in this way i can use insert with
my format.
Can I u
html
>
> Regards,
>
>
> Almar van Pel
>
>
> -Oorspronkelijk bericht-
> Van: Vaishali Vaidya [mailto:[EMAIL PROTECTED]]
> Verzonden: donderdag, december 20, 2001 11.44
> Aan: [EMAIL PROTECTED]
> Onderwerp: Date Format Query
> Urgentie: Hoog
>
>
Hi,
I am a new user to MySql, and have recently installed version 3.23.25-beta.
I have a date string of the type 'DD-MON-YY' (for Oracle Users) (Eg.
20-DEC-01')
If I try to insert this into a date field in the table, either as it is, or
via the DATE_FORMAT function, it inserts a NULL
Even when I t
Hi All,
Is there any way to modify the date format used by MyODBC when
returning dates? By example, I have a field in the database with the
value 2001-11-01 (this is Nov. 1st, 2001).
When I read it in my VB program I get the next date 11/1/2001; this
is because the computer date format
Fax: +49-30-46307-388
- Original Message -
From: "Werner Stuerenburg" <[EMAIL PROTECTED]>
To: "Claudemir F. Martins" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, July 27, 2001 9:49 AM
Subject: Re: Date Format in MySQL
>
>
> Claudemir
Claudemir F. Martins schrieb am Donnerstag, 26. Juli 2001, 21:03:59:
> Is possible to change the MysQL Date fromat from -mm-dd to dd-mm- ?
No. This is the standard format. You can, however, reformat the
result sets according to your needs. This format allows easy
manipulation of dat
Hello Friends
Is possible to change the MysQL Date fromat from -mm-dd to dd-mm- ?
Thanks
Claudemir F. Martins
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.
On 26-Jul-2001 Claudemir F. Martins wrote:
> Hello Friends
>
> Is possible to change the MysQL Date fromat from -mm-dd to dd-mm-
> ?
>
Check for DATE_FORMAT() in the manual.
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before
Date |Thu, 26 Jul 2001 15:03:59 -0400
>From |"Claudemir F. Martins" <[EMAIL PROTECTED]>
Hello!
CFM> Hello Friends
CFM> Is possible to change the MysQL Date fromat from -mm-dd to dd-mm- ?
CFM> Thanks
CFM> Claudemir F. Martins
You can use DATE_FORMAT
On Thursday 26 July 2001 11:03, Claudemir F. Martins wrote:
> Hello Friends
>
> Is possible to change the MysQL Date fromat from -mm-dd to dd-mm-
I suppose, by changing the source code, and reompiling, which would break
several other things.
> Before posting, please check:
>http
) 767-0249
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> ]On Behalf
> Of pak
> Sent: 18 July 2001 08:58
> To: [EMAIL PROTECTED]
> Subject: Default date format
>
>
> Is there a default format for Date ?
> /mm/dd or
> mm
Is there a default format for Date ?
/mm/dd or
mm/dd/ or
dd/mm/ ?
I am not sure which format I should use in SQL.
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mys
;
# Your output should now be $db_date = 2001-06-28
Hope this helps ;)
>>What programming language are you using?
>>
>>
>>Hi guys, does anyone help me with this simple thing ??
>>
>>I have a date format problem, I need a spanish format please read the
>>
What programming language are you using?
Hi guys, does anyone help me with this simple thing ??
I have a date format problem, I need a spanish format please read the
following lines:
Receive from input "28/06/2001"
Want to change it to "2001-06-28" to write the D
gt;>
>>I have a date format problem, I need a spanish format please read the following
>lines:
>>
>>Receive from input "28/06/2001"
>>Want to change it to "2001-06-28" to write the Database
>>Use to do it "DATE_FORMAT (inputdate, %Y-%
Hi guys, does anyone help me with this simple thing ??
I have a date format problem, I need a spanish format please read the following lines:
Receive from input "28/06/2001"
Want to change it to "2001-06-28" to write the Database
Use to do it "DATE_FORMAT (inputdat
Database,sql,query
> -Message d'origine-
> De : Nicolas Villatte [mailto:[EMAIL PROTECTED]]
> Envoyé : mardi 22 mai 2001 23:18
> À : '[EMAIL PROTECTED]'
> Objet : Date format prolem
>
>
> I insert a date like this '2002-10-15' in the
> Use ints and bigints?
INT much use I's afraid.
I want external data processing to get back a format that
it can use, but still want to be able to use the MYSQL
date functions, which are excellent.
A better idea would be TIMESTAMPS(14) but these suffer from
the 32bit int 2037 problem (aka the Y
On 17-May-01 Jeff Armstrong wrote:
> Most DBs allow specification of date format when retrieving dates from a
> server,
> usually as part of the database connection.
>
> Is there a simple way to force mySQL to always return dates and datetime in
> ISO
> long format, wit
> Is there a simple way to force mySQL to always return dates and
> datetime in
> ISO
> long format, without the '-', ':' and spaces? (in a TIMESTAMP(14) like
> format)
>
> I always want 20010517 rather than 2001-05-17,
> and 20010517130500 rather than 2001-05-17 13:05:00
Use ints and bigints?
Most DBs allow specification of date format when retrieving dates from a
server,
usually as part of the database connection.
Is there a simple way to force mySQL to always return dates and datetime in
ISO
long format, without the '-', ':' and spaces? (in a TIMESTAMP(14) li
On 09-May-01 Darla Baker wrote:
> I have a text file which is extracted from a non-sql
> database each night and then a cron sql script runs to
> insert the text data into the mysql database tables.
>
> My problem is that the date data in the text file is
> formatted incosistently (12/31/00 or 1
I have a text file which is extracted from a non-sql
database each night and then a cron sql script runs to
insert the text data into the mysql database tables.
My problem is that the date data in the text file is
formatted incosistently (12/31/00 or 12-31-00) and so
the fields that hold date dat
Hi,
I want to import in my DB in MySql a data. Everyting data is ok
but for date format ( yy/mm/dd ) this I have in .csv format when I
importI see that -00-00 in all date fields
Any help is realy apreciate
Regards
Dan
Hi,
If you use DBTools (http://dbtools.vila.bol.com.br), using the import text
wizard you have a lot of parameters to set, including date format and
separators. Unfortunatelly, runs only on windows platforms.
[]'s
Crercio
-Original Message-
From: Kevin Xin Lin [mailto:[EMAIL PROT
Hi there,
I have many files need import into mysql database. Unfortunately, the
date format in my csv file is mm/dd/, so is there a wordaround that
I don't need write another script to convert all my files?
Thanks.
Thank paul. I know about Date_format, but was curious if there is some
setup parameters would allow us to define the MySql date format .
Paul DuBois wrote:
> On Fri, Jan 26, 2001 at 01:40:12PM -0700, Web master wrote:
>
>> Hello,
>>
>> I would like to change the d
On Fri, Jan 26, 2001 at 01:40:12PM -0700, Web master wrote:
> Hello,
>
> I would like to change the default date format MySql from /mm/dd to
> dd/mm/. Does anyone know, how to make this change in MySql?
You can't.
However, you can select DATE, DATETIME, or TIMES
Hello,
I would like to change the default date format MySql from /mm/dd to
dd/mm/. Does anyone know, how to make this change in MySql?
Thanks.
-
Before posting, please check:
http://www.mysql.com/manual.php (the
89 matches
Mail list logo