SD card Initialization failed during the data logger interface with Arduino Uno

I try to collect the LDR data and save it in SD card. but i find out Initialization failed status during checking the serial monitor. Plz give some solutions in this regards. I attach the Code and the Serial Monitor Screen Short.

#include<SD.h>
#include <SPI.h>

#define SD_ChipSelectPin 10  
File myFile;
int LDRPin = A0;
int val=0;

void setup() {
  
pinMode(LDRPin, INPUT);
Serial.begin(9600);
Serial.println("Initialising SD card...");
if(!SD.begin(SD_ChipSelectPin))
{
  Serial.println("Initialization failed");
  return;
}
  Serial.println("Initialization success");
  
}

void loop() {

val=analogRead(LDRPin);
myFile=SD.open("test.txt", FILE_WRITE);
if(myFile)
{ 
  myFile.print(val);
  Serial.print(val);
  myFile.print(",");
  Serial.print(",");
  myFile.println(millis());
  Serial.println(millis());
  myFile.close();
}
else
{
  Serial.println("Error in opening file");
}
delay(1000);
}

It doesn't like pin 10 as CS.

I changed it from CS pin 10 to 4 but facing the same problem.

I changed it from CS pin 10 to 4 but facing the same problem.

Please, make a physical wiring change in your SD Card. The CS-pin of the SD Card must be connected to DPin-4 of the UNO. Also, operate the SD card on 3.3V.

I executed your codes without any change (except #define SD_ChipSelectPin 4) in my UNO, and the codes are working fine.

GolamMostafa: Please, make a physical wiring change in your SD Card. The CS-pin of the SD Card must be connected to DPin-4 of the UNO. Also, operate the SD card on 3.3V.

I am looking at my Seeed Studio SD card shield, and I don't see what you have in the photo.

Can you please post a pictorial view of your SD Card Module?

I attach the data logger module pic

You module has the CS-pin, connect it to Dpin-4 of the UNO and execute the program. The program of your original post should work; it works for me.

Is their any certain file format is required for SD card??

My SD card file format is FAT32.

Thanks to Everyone ...due to some connection problem i'm not getting the data..now it's solved.

FAT32 system is alright. You may read the lecture notes of this link.