cdate

  1. S

    CDate

    Greetings, I have a I column of values of the format " Aug 30, 2018" and so on. I would like to be able to convert these into the format "MM/DD/YYYY" Dim A as Long, LastRow as Long LastRow = Cells(Rows.Count,"A").End(xlUp).Row For K = LastRow to 1 Step -1 CDate(Cells(K,"A").value) =...
  2. R

    string Date with day of week into mm/dd/yyyy in VBA

    I have a column with the following info in a range of cells <tbody> Tue Mar 05 2019, I was looking at some examples for CDate, but I have the day of week in there as well. I think I would need to delete the first 3 char and then apply Cdate. How would I convert that to 03/05/2019...
  3. A

    Type mismatch error with use of cdate

    Perhaps I'm using cdate incorrectly. I wish to take the text date from a userform control ("processdate") and convert it to date serial. me.processdate.value="Tuesday, January 23, 2018" My code: Private Sub Label834_Click() Dim uid uid = CDate(processdate.Value) End Sub I am getting...
  4. RasGhul

    Userform Date entry issues

    Hi Team, I've been using the following code faithfully on many sheets, but now I'm getting a runtime error on the cdate function as I want the "me.tbdate" textbox to format as a proper date dd/mm/yyyy. for some reason without cdate a standard textbox outputs dates as mmddyy by default. How...
  5. L

    Combining Cdate with Iif in calculated query

    this is a great board for answers How would I incorporate CDate into the below query string in order to calculate the “stringed” date value ? Status: IIf( ([Status Cd]<>"COMP",[Status Cd],IIf([expires]< Date(),"Pass Due",IIf([Expires]-Date()<=30,"30 Days", IIf([Expires]-Date()<=60,"60...
  6. A

    Need to compare 2 date variables. 1 variable is a string, the other variable is a date variable

    I need to compare 2 dates that are stored in variables. The problem I am having is that the first date is stored in a Date type variable, the 2nd is stored in a string type variable. The reason the 2nd date is in a string type variable is because it is pulling the date from a different...
  7. O

    debug error with CDate function in empty textbox

    Hey guys, I am trying to create a form that the user keys in the date in the format dd/mm/yyyy, and it then gets pasted into a cell. Sometimes though there isn't always a need to fill in the textbox with a date, and that produces an error (because there are no values there that are a date)...
  8. C

    Creating time difference box in VBA excel

    Couple of things I want to do here... 1. I am working in military time, and need both the cb_starttime1 and cb_endtime1 to be entered as a four digit number hhmm, but display as hh:mm. 2. I then need the tb_timedifference1 to calculate the amount of hours spent on the job. I also want this...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top