Greetings once again.
I was a little puzzled today when I searched the forums and wasn't able to find my answer. So I decided to post and pick at the available fishbowl of wisdom.
I'm accessing data in SQL via ASP on one page and bringing that data over to my main page via Ajax. One of the pieces of data is a date as a string but there's too much in it so I need to strip some out.
The date is coming over as M/D/YYYY H:MM:SS AM/PM
(note, it's not always MM/DD/YYYY)
I only want to get the month, day, and year to my page and I figured I would just do it in the Javascript.
Would this be a good place for regular expressions? Seems to me that I should be able to get everything before the first space and omit the rest. Is that possible or what would be the best way of going about this particular problem?
Thanks in advance,
John