473,386 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

if i cross this my project is compleeted

seshu
156 100+
i have a table in which one of the columns work is to save the time that is current time now what should be the data type of that column and after creating the table we can in insert statement if i say the values as now will the current time will be entered
please help me actually this idea is added just now so please help me
Nov 30 '06 #1
3 1516
Data type:
datetime (if you want date and time both)
time (if you want time only)

time is in the format:
HH:MM:SS

datetime is in th format:
dd:mm:yyyy HH:MM:SS

Insert statement:

Now is not used in mysql, curtime() or curdate() is used

INSERT INTO Yourtable VALUES('curdate().curtime()')

which programming language are you using at front end to insert the time?

if you are using php then:
$current_time = time(); to retrieve the time

if you are using coldfusion then
<cfset time= timeformat(now(),"HH:MM:SS")> to retrieve the time
Nov 30 '06 #2
seshu
156 100+
thank u guys thanx for ur replies but now iam facing one more problem here
in mysql the date format is yyyy-mm-dd but there in my vb.net the date formate is quite reverse now my cmd.executenonquery is not working for this one reason can any one help me out here
Nov 30 '06 #3
ronverdonk
4,258 Expert 4TB
Convert the SQL date to the dd-mm-yyyy format using SQL statement
Expand|Select|Wrap|Line Numbers
  1. SELECT DATE_FORMAT(column, '%d-%m-%Y')
Ronald :cool:
Nov 30 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Peter Bär | last post by:
A Question to the C#/.Net Gods of this forum: are there performance penalties when i compile (C#, FW1.1, ASP.NET, Studio2003) a central baseclass in a different assembly than all the derived...
2
by: Peter Bär | last post by:
A Question to the C#/.Net Gods of this forum: are there performance penalties when i compile (C#, FW1.1, ASP.NET, Studio2003) a central baseclass in a different assembly than all the derived...
17
by: Mark Rae | last post by:
Hi, I'm interested in your opinion concerning how far you would consider it necessary to code for cross-browser compatibility these days, especially for public-facing Internet sites... ...
5
by: Sean Kirkpatrick | last post by:
I'm sure you'll look at this question and wonder if I've been sniffing glue. I haven't, really. My legacy app is written in VB6 and we're chipping away at converting it to .Net. I badly need to...
12
by: XShadow | last post by:
Hi, I'm working on a new cross platform c++ framework, I principally wrote it for fun in my spare time. The project becomes rather large so I decided to make it available on the web in the hope...
5
by: Spam Catcher | last post by:
Hello Everyone, I need to implement single sign on across serveral applications. Some applications are under my control while others are under the control of 3rd parties. Can anyone suggest a...
6
by: brandon.e.taylor | last post by:
I am looking for a tool capable of producing HTML pages from source files written in different languages, where the source written in one language is a port of the source written in another...
12
by: Tomás Ó hÉilidhe | last post by:
I don't know the first thing about cross-platform GUI programming, so I'd like to ask a few quick questions. Which library is best for someone who appreciates portable programming and correct...
3
by: kimiraikkonen | last post by:
Hi, I was looking for an example on CodeProject and saw an interesting thing, i downloaded the article source code and converted to my VB 2005 Express and compiled with no problem, however when i...
2
by: bhupendrakumar | last post by:
error message System.InvalidOperationException was unhandled Message="Cross-thread operation not valid: Control 'listView2' accessed from a thread other than the thread it was created on." ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.