hello everybody, i have datetime format in mysql database table. now,
in mysql date is YYYY-MM-DD format. how can i insert date in this
format with VB Script ? i had tried following
dim dt, dy, dm, dd, pd, tm
tm = Time
dt = Date
dy = DatePart("YYYY" ,dt)
dm = DatePart("M",dt )
dd = DatePart("D", dt)
pd = dy & "-" & dm & "-" & dd & " " tm
this shows correct datetime, but doesn't insert in database table. it
gives error: incorrect format.
this is my first project in MySQl. please help
thanks
Bhagvati 2 8943
bhv wrote:
hello everybody, i have datetime format in mysql database table. now,
in mysql date is YYYY-MM-DD format. how can i insert date in this
format with VB Script ? i had tried following
dim dt, dy, dm, dd, pd, tm
tm = Time
dt = Date
dy = DatePart("YYYY" ,dt)
dm = DatePart("M",dt )
dd = DatePart("D", dt)
pd = dy & "-" & dm & "-" & dd & " " tm
this shows correct datetime, but doesn't insert in database table. it
gives error: incorrect format.
this is my first project in MySQl. please help
thanks
Bhagvati
Writing "Urgent" in the subject really won't help your chances of a
speedy response!
Good luck
well, i have done it.
Bhagvati
strawberry wrote:
bhv wrote:
hello everybody, i have datetime format in mysql database table. now,
in mysql date is YYYY-MM-DD format. how can i insert date in this
format with VB Script ? i had tried following
dim dt, dy, dm, dd, pd, tm
tm = Time
dt = Date
dy = DatePart("YYYY" ,dt)
dm = DatePart("M",dt )
dd = DatePart("D", dt)
pd = dy & "-" & dm & "-" & dd & " " tm
this shows correct datetime, but doesn't insert in database table. it
gives error: incorrect format.
this is my first project in MySQl. please help
thanks
Bhagvati
Writing "Urgent" in the subject really won't help your chances of a
speedy response!
Good luck
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tony Clarke |
last post by:
Hi,
Is there an easy way of formatting a MySQL DATETIME field in PHP. At the
moment I'm using the code below, as using the returned DATETIME value from
the database with the date() function doesn't seem to work. I know I could
use the MySQL function date_format to format it before its returned but I
use a simply query (e.g. SELECT * FROM TABLE WHERE colum = '$somevalue') and
a while loop to read all the variables in, so I don't think I...
|
by: ramarnath |
last post by:
Problem in sending datatime format to the .net webservice from php.
description follows.
I've created a .net webservice.
..Net Webservice:
<WebMethod()> _
Public Function HelloDate(ByVal mydate As DateTime) As String
|
by: Vishal |
last post by:
Hey,
I have differnt kind of dates. They can be in this format:
Thur, 23 Sept 2004 14:24:15 GMT
Thur, 23 Sept 2004 14:24:15 PST
Thur, 23 Sept 2004 14:24:15 CST
and so on....
|
by: Shapper |
last post by:
Hello,
I created a dataset from a XML file. One of the dataset fields is
.
In an ASP:Repeater I am displaying the field.
<%# DataBinder.Eval(Container.DataItem, "pubDate", "{0:f}") %>
The date displayed has the following format, the same as in the XML
file:
|
by: rlaemmler |
last post by:
Hi,
I just migrated my web app to .NET 2.0. Part of the app creates some
business objects from a MySQL query which is returned by a web service.
Some of those objects contain DateTime properties. Using .NET 1.1 soap
serialized a DateTime always in the ISO8601 format. e.g.
"2006-01-27T07:42:11.3014976-08:00". Now using .NET 2.0 suddenly the
DateTime objects instanciated from a MySQL query get serialized as
"2006-01-26T18:40:56". Only...
| |
by: Brandon |
last post by:
I'm using PHP with MySQL 4.x and was having trouble converting a
datetime from MySQL into a formatted string until I ran across this
solution that converts a YYYY-MM-DD HH:MM:SS string into a Unix-style
timestamp and then formats it.
$timestamp = "2005-04-06 15:43:34";
$time = strtotime($timestamp);
print date('Y-m-d \a\t H:i', $time)."\n";
However, it seems kind of counter productive. After all, aren't people
|
by: rouven |
last post by:
Hi, i am trying to convert that time format '05:26:40 Jun 19, 2007 PDT' into mysql compatible format like YYYY-MM-DD HH:MM:SS.
the code i tried was:
from datetime import datetime
from time import strptime
f1.write("strptime(%r); locale: %r" % (olddate, locale.getlocale()))
newdate = time.strptime(olddate, "%H:%M:%S %b %d, %Y %Z")
mysqldate = time.strftime("%Y-%m-%d %H:%M:%S", newdate)
|
by: smitanaik |
last post by:
hi i want to do validation of datetime in javascripti.e is i want it in this format dd:mm:yyyy:hh:mm:ss
plz heklp me out its urgent
|
by: electronik |
last post by:
I dont really have a problem, but I want to make my code faster and prettier.
I have some tables with DATETIME in it.
They have the std format %Y-%m-%d %H:%i:%s
I need them to be in %d.%m.%Y %H:%i format.
I tried to fix it with the server variable "datetime_format".
After reading a lot in mysql doc I found out that:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |