If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > problem with date modifications with dd-mm-yyy format

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-04-12, 23:57
alexiop alexiop is offline
Registered User
 
Join Date: Aug 2006
Posts: 87
problem with date modifications with dd-mm-yyy format

Hi evrybody have this code:


UPDATE TABLE
SET STARTDATE=#CREATEODBCDATE(FORM.SDATE)#
WHERE DATEID=#DATEID#


this code is ok and modifies date on my table as long as the day is more than 12 the date is picked from a calendar with this format dd-mm-yyy (italian standard)

the date should be inserted with this format yyyy-mm-dd

any help how could i do this?

thanks
Reply With Quote
  #2 (permalink)  
Old 01-05-12, 00:04
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
Since your syntax indicates that you're using Microsoft Access, I'm going to move this thread from the Microsoft SQL Server forum to the Microsoft Access forum where you'll get better answers.

Dates are printed/displayed as characters, but they are stored internally as bit strings. The internal format of the date and the way that you're used to seeing it on the screen or paper have only a casual relationship. A date can be displayed using ISO, American, Hebrew, Arab, Italian, or other notations because the disply value is created from the internal bit value by an algorithm.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #3 (permalink)  
Old 01-05-12, 03:15
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
isn't this a coldfusion question?
Im not aware of createODBCDate as an Access function, but according to google it is a Coldfusion function
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #4 (permalink)  
Old 01-05-12, 11:36
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
healdm, you may be correct... I may have jumped the gun.

alexiop, please tell us what database engine and progreamming tool(s) you are using.

I'll try to move your question to a more appropriate place once I know that.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On