Click here to Skip to main content
15,895,799 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Oh Heinlen, how could you? Pin
Daniel Pfeffer23-Jul-15 0:29
professionalDaniel Pfeffer23-Jul-15 0:29 
GeneralRe: Oh Heinlen, how could you? Pin
_Maxxx_23-Jul-15 0:36
professional_Maxxx_23-Jul-15 0:36 
GeneralRe: Oh Heinlen, how could you? Pin
Daniel Pfeffer23-Jul-15 0:49
professionalDaniel Pfeffer23-Jul-15 0:49 
GeneralRe: Oh Heinlen, how could you? Pin
_Maxxx_23-Jul-15 19:15
professional_Maxxx_23-Jul-15 19:15 
GeneralRe: Oh Heinlen, how could you? Pin
Daniel Pfeffer23-Jul-15 21:58
professionalDaniel Pfeffer23-Jul-15 21:58 
GeneralComing soon to a store near you...not! Pin
Mike Hankey22-Jul-15 14:21
mveMike Hankey22-Jul-15 14:21 
GeneralRe: Coming soon to a store near you...not! Pin
W Balboos, GHB23-Jul-15 1:23
W Balboos, GHB23-Jul-15 1:23 
GeneralBug of the Day Pin
Chris Maunder22-Jul-15 10:16
cofounderChris Maunder22-Jul-15 10:16 
I'm trying to set a value to the maximum smalldatetime allowed in SQL, yet what's appearing is "6 June 1979". Nothing I do seems to work: ensuring Culture is OK, ensuring I'm passing dates around in a sensible format, ensuring the data I'm setting is the actual date I'm setting.

In the debugger I see _date with a value of "6/06/2079 12:00:00 AM" (see rant below). The date is fine. I pass this into a formatter to turn it into "dd-MMM-yy" format. That works perfectly and the output is correct. This string goes to the user, they hit submit, it comes back and is parsed fine. Everything works perfectly.

Except the date always comes back as 1979.

ARGH. And then I spot it.

15 years too late I've been hit by the Y2K bug.

6/06/2079 12:00:00 AM is 6 Jun 2079 -> "6-Jun-79" which is parsed as 6-Jun-1979.

/more coffee, then better formatting.

As a side note: The American date format (mm/dd/yyyy) is painfully and dangerously ambiguous so given that OS installs are often set with US as the region, surely debuggers should display dates and times as dd-MMM-yyyy or even better, yyyy-mm-dd to account for the Rest Of The World who wants to scream everytime they get an email saying "the date is 4/7/2015".
cheers

Chris Maunder

GeneralRe: Bug of the Day PinPopular
Cornelius Henning22-Jul-15 10:34
professionalCornelius Henning22-Jul-15 10:34 
GeneralRe: Bug of the Day Pin
908236522-Jul-15 10:55
908236522-Jul-15 10:55 
GeneralRe: Bug of the Day Pin
R. Giskard Reventlov22-Jul-15 10:56
R. Giskard Reventlov22-Jul-15 10:56 
GeneralRe: Bug of the Day Pin
Afzaal Ahmad Zeeshan22-Jul-15 11:02
professionalAfzaal Ahmad Zeeshan22-Jul-15 11:02 
GeneralRe: Bug of the Day Pin
User 1106097922-Jul-15 11:00
User 1106097922-Jul-15 11:00 
GeneralRe: Bug of the Day Pin
Daniel Pfeffer22-Jul-15 19:31
professionalDaniel Pfeffer22-Jul-15 19:31 
GeneralRe: Bug of the Day Pin
Cornelius Henning22-Jul-15 11:46
professionalCornelius Henning22-Jul-15 11:46 
GeneralRe: Bug of the Day Pin
H.Brydon22-Jul-15 17:28
professionalH.Brydon22-Jul-15 17:28 
GeneralRe: Bug of the Day Pin
jsc4223-Jul-15 4:39
professionaljsc4223-Jul-15 4:39 
GeneralRe: Bug of the Day Pin
_Maxxx_22-Jul-15 20:40
professional_Maxxx_22-Jul-15 20:40 
GeneralRe: Bug of the Day Pin
908236523-Jul-15 6:44
908236523-Jul-15 6:44 
GeneralRe: Bug of the Day Pin
mBuchwald23-Jul-15 7:33
professionalmBuchwald23-Jul-15 7:33 
GeneralRe: Bug of the Day Pin
_Maxxx_23-Jul-15 19:20
professional_Maxxx_23-Jul-15 19:20 
GeneralRe: Bug of the Day Pin
908236524-Jul-15 3:17
908236524-Jul-15 3:17 
GeneralRe: Bug of the Day Pin
_Maxxx_24-Jul-15 4:01
professional_Maxxx_24-Jul-15 4:01 
GeneralRe: Bug of the Day Pin
Richard MacCutchan22-Jul-15 21:58
mveRichard MacCutchan22-Jul-15 21:58 
GeneralRe: Bug of the Day Pin
Dan Sutton23-Jul-15 8:01
Dan Sutton23-Jul-15 8:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.