Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird Date Formatting

Status
Not open for further replies.

jfrost10

Programmer
Jun 3, 2001
2,004
0
0
CA
Hey all,

I have a date that I need to stick into Oracle. If...

Regional Settings = MM/dd/yyyy
and
Format in code = MM/dd/yyyy
this will go through no problem.

Regional Settings = dd/MM/yyyy
and
Format in code = MM/dd/yyyy
this will error out at the Oracle level

Regional Settings = dd/MM/yyyy
and
Format within vb.net code to MM/dd/yyyy
this will error when I try to assign the formatted value to a date or a datetime variable.

Does this make any sense? I mean, if we format the date a certain way, shouldn't the date/datetime variable be able to be assigned to it even though its different from the environment settings?

Thanks,

D
 
Depends on how your code reads it have you used Format Function for this?
 
Ah, the issue for us seems to be that the Date variable apparantly must be in the M/d/yyyy format and you can't shove a dd/MM/yyyy formatted string into a date variable.

D
 
are you using parameters??



Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
If you use a modified ISO-8601 format (yyyy-mm-dd hh:mm:ss.ssss) you'll seldom have problems with your database recognizing the format.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top