473,626 Members | 3,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DATETIME field

hi,
I have a datetime field with this format 'CCYY-MM-DD
hh:mm:ss'. I'd like to display as a 'DD-MM-YYCC'.
thanx for your collaboration

Simone

Jun 27 '06 #1
7 1743

simone wrote:
hi,
I have a datetime field with this format 'CCYY-MM-DD
hh:mm:ss'. I'd like to display as a 'DD-MM-YYCC'.
thanx for your collaboration


Where do you get this datetime field from? The user? MySQL?

Jun 27 '06 #2
<comp.lang.ph p>
<Sjoerd>
<27 Jun 2006 07:47:09 -0700>
<11************ *********@c74g2 000cwc.googlegr oups.com>
simone wrote:
hi,
I have a datetime field with this format 'CCYY-MM-DD
hh:mm:ss'. I'd like to display as a 'DD-MM-YYCC'.
thanx for your collaboration


Where do you get this datetime field from? The user? MySQL?


I think what they meant was they want to display it in a different way
after its been grabbed from the database .
--
www.emailuser.co.uk/?name=KRUSTOV
Jun 27 '06 #3
puzzled! why would you want to do that?
simone wrote:
hi,
I have a datetime field with this format 'CCYY-MM-DD
hh:mm:ss'. I'd like to display as a 'DD-MM-YYCC'.
thanx for your collaboration

Simone


Jun 27 '06 #4
Rik
simone wrote:
hi,
I have a datetime field with this format 'CCYY-MM-DD
hh:mm:ss'. I'd like to display as a 'DD-MM-YYCC'.
thanx for your collaboration


strftime('%d-%m-%y%C',strtotime ($field));

Grtz,
--
Rik Wasmus
Jun 27 '06 #5
Mel
On 2006-06-28 01:29:36 +1000, "strawberry " <za*******@gmai l.comsaid:
puzzled! why would you want to do that?
simone wrote:
>hi,
I have a datetime field with this format 'CCYY-MM-DD
hh:mm:ss'. I'd like to display as a 'DD-MM-YYCC'.
thanx for your collaboration

Simone

Becuase DD-MM-YYYY is the standard date format for most countries.

^-- that's my Best Guess(TM).

Jul 11 '06 #6
Mel wrote:
On 2006-06-28 01:29:36 +1000, "strawberry " <za*******@gmai l.comsaid:
puzzled! why would you want to do that?
simone wrote:
hi,
I have a datetime field with this format 'CCYY-MM-DD
hh:mm:ss'. I'd like to display as a 'DD-MM-YYCC'.
thanx for your collaboration

Simone


Becuase DD-MM-YYYY is the standard date format for most countries.

^-- that's my Best Guess(TM).
yeah, but the op wants dd-mm-yycc

Jul 12 '06 #7
Mel
On 2006-07-12 10:28:12 +1000, "strawberry " <za*******@gmai l.comsaid:
Mel wrote:
>On 2006-06-28 01:29:36 +1000, "strawberry " <za*******@gmai l.comsaid:
>>puzzled! why would you want to do that?
simone wrote:
hi,
I have a datetime field with this format 'CCYY-MM-DD
hh:mm:ss'. I'd like to display as a 'DD-MM-YYCC'.
thanx for your collaboration

Simone


Becuase DD-MM-YYYY is the standard date format for most countries.

^-- that's my Best Guess(TM).

yeah, but the op wants dd-mm-yycc
Oh. Right you are. That's really odd.

Jul 12 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
14233
by: andrew lowe | last post by:
Hi, Please bear with me on this problem, first I'll give you some background: I have an object that contains a DateTime field which i pass to a webservice public class Foo { public DateTime RequestDate; }
6
1813
by: Carl | last post by:
Hi, to be use with SQL server database 1- From window form textbox object From this assignement, txtTOTAL.Text="0.00m"; How do you convert back to decimal type ? How do you assign a default datetime value to it ? How do you convert back the text enter by user into datetime ?
44
16949
by: Frank Rizzo | last post by:
Any ideas?
6
16250
by: FatboyCanteen | last post by:
When I using dataset to append a null value to the datetime field. It throw a error -> can not convert db.null to system.date Can there is any standard to pass a Null value to the DateTime Field! (It is successful to pass the Null Value to other type of Field)
1
1981
by: Thierry | last post by:
Hi, I've got the next problem: I have a datetime field in my database (sql-server) and I want the option in it that this field can be empty. But if I leave that datetime field empty I get the error: "The value you entered is not consistent with the data type or length of the column."
1
4764
by: RML | last post by:
Hi everyone, I am using VB.NET 2003 and an OleDBDataAdapter to update an Access table's DateTime field. The field's format is set to "General Date" (ie: 11/24/2004 8:00:00 AM). The problem is the field ends up with only a date, with no time component. In my project... I added an OleDBDataAdapter using the wizzard to my form. I generated the DataSet and added the desired table. I verified the field type in the
4
4596
by: kd | last post by:
Hi All, I have a datetime column in a table on the SQL database. I need to insert values into the datetime column from vb.net code. Here is my code: dim nameval, str, qry as string nameval = "abc" str = "2005/03/16 14:20" qry = "insert into tab1(name,dateval) values(" & "'" & nameval & "'," & "'" str & "')" ....
5
2591
by: iulian.ilea | last post by:
Is correct to have a varchar field and insert dates of type dd/mm/yyyy into it? I choose this method because I have an application that runs on more than one server. So, if I used a datetime field (MSSQL Server) it worked on my test machine. If I run the same application on another machine with different regional settings is not working. I tried with date_default_timezone_set to change timezone but is not changing. After...
3
5316
by: john | last post by:
I am using MS Sql Express as the backend database for a Microsoft Access front end application. I am using a calendar control to store the desired date in the sql datetime field. The time portion of the field defaults to 12:00am. What I want is to also store the time in the same datetime field as the date, but I want to use a separate control from the calendar control. I.e. I want the user to choose the date from the calendar control,...
4
10692
by: Bill Gower | last post by:
Why won't this work? What do I need to do to make it work? DateTime? DateMember; if((DateTime.Parse(oldRow.ToString) == null)) DateMember = null; else DateMember = DateTime.Parse(oldRow.ToString()); The program is failing on the if saying that the null value in the field in
0
8265
marktang
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...
0
8196
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,...
0
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
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 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...
1
6125
isladogs
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...
0
5574
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4092
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...
1
1808
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1511
bsmnconsultancy
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...

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.