Thread: System Dates
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default System Dates

If by "date variable" you really meant a variable Dim'med "As Date", then the answer to your question is no... sort of. Dates do not have format until they are displayed... to VB, they are just floating point numbers with the integer part representing the number of days past "date zero" (December 31, 1899) and the decimal part representing the fractional part of a 24-hour day (6:00am would be 6/24 which equals 0.25). When you display a date, VB uses your computer's Regional Settings to figure out how to show the date to you. You can over ride this pre-determined output using the Format function. You can also assign the output from the Format function to a String variable, and the text assigned to the variable will be in the form you specified in the Format function. So, the answer to your question kind of depends on what it is you want your code to actually do.

--
Rick (MVP - Excel)


"JT" wrote in message ...
Is it possible to convert a system date in dd/mm/yy format to the a date
variable in the mm/dd/yy format?


--
JT